Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Static website generator #3

Closed
egoist opened this issue Mar 20, 2017 · 1 comment
Closed

Static website generator #3

egoist opened this issue Mar 20, 2017 · 1 comment

Comments

@egoist
Copy link
Collaborator

egoist commented Mar 20, 2017

This should be easy. Basically, we need to:

  1. generated assets files (js/css/chunks), it's as easy as unvue.build()
  2. generated html files based on user-supplied routes:
const unvue = require('unvue')

unvue.generate({
  paths: ['/', '/post/hello', '/post/world']
})

The generate function might look like:

function generate(paths) {
  const renderer = createRenderer()
  paths.forEach(url => {
    renderer.renderToString({ url }, (err, html) => {
      fs.writeFileSync //...
    })
  })
}
@egoist egoist changed the title Generate static files Static website generator Mar 20, 2017
@egoist
Copy link
Collaborator Author

egoist commented Mar 21, 2017

Release in v0.7.0

@egoist egoist closed this as completed Mar 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant