Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pre-render all routes? #187

Closed
OngeUK opened this issue Jul 4, 2017 · 2 comments
Closed

How to pre-render all routes? #187

OngeUK opened this issue Jul 4, 2017 · 2 comments

Comments

@OngeUK
Copy link

OngeUK commented Jul 4, 2017

Currently, using the default files that are created upon running preact create, when I run a build a single index.html with pre-render mark-up is generated. What I'm looking for is for all route pages to be generated (after all, not all users will enter the site via the /index.html page).

Ideally a build would produce the following statically generated pages:

/index.html
/profiles/index.html
/profiles/john/index.html

Is it possible to do this, and if so how?

@framp
Copy link
Contributor

framp commented Jul 5, 2017

Duplicate of #185

I created a pull request to fix it: #192
You may want to give it a go.

I'm using it like this:
https://github.com/framp/framp.github.io/blob/master/src/prerender-urls.json
https://github.com/framp/framp.github.io/blob/master/package.json#L10

@lukeed
Copy link
Member

lukeed commented Jul 5, 2017

Closed via #192 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants