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

Add purely static export #18

Closed
arctic-hen7 opened this issue Sep 21, 2021 · 2 comments · Fixed by #23
Closed

Add purely static export #18

arctic-hen7 opened this issue Sep 21, 2021 · 2 comments · Fixed by #23
Assignees
Labels
A-cli Area: command line interface A-router Area: router A-templates Area: templates C-enhancement Category: enhancement D-medium Difficulty: medium P-medium Priority: medium S-in-development Status: in development

Comments

@arctic-hen7
Copy link
Member

Is your feature request related to a problem? Please describe.
Perseus is currently not technically JAMstack because it doesn't support eliminating server-side code. Many Perseus sites only rely on build-time rendering strategies, and performance would be improved if we could export to purely static files.

Describe the solution you'd like
The Perseus CLI should have an export command that creates a purely static set of files that can be served from anywhere, like a CDN, without any dependency on a server.

Describe alternatives you've considered
Zola is a great alternative in the meantime, but being able to have this work with Perseus would be a huge plus, and would get the project even with NextJS on JAMstack support.

Additional context
Add any other context or screenshots about the feature request here.

@arctic-hen7 arctic-hen7 added the C-enhancement Category: enhancement label Sep 21, 2021
@arctic-hen7 arctic-hen7 self-assigned this Sep 21, 2021
@arctic-hen7 arctic-hen7 added A-cli Area: command line interface A-router Area: router A-templates Area: templates D-medium Difficulty: medium P-medium Priority: medium S-in-design Status: in design labels Sep 21, 2021
@arctic-hen7
Copy link
Member Author

In theory, this should be able to be done by adding an extension of the build process for exporting, and shouldn't actually need any changes to the client-side app shell.

@arctic-hen7 arctic-hen7 added S-in-development Status: in development and removed S-in-design Status: in design labels Sep 23, 2021
@arctic-hen7
Copy link
Member Author

Okay, one slight pitfall of any approach to this is that we have to write the initial load files as .html files, which means whatever web server is used has to strip those extensions. For example, this causes things to break with Python's http.server. Somewhat ironically, Vercel's serve works perfectly! This problem should be very easy to solve though for whatever custom server ends up being set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: command line interface A-router Area: router A-templates Area: templates C-enhancement Category: enhancement D-medium Difficulty: medium P-medium Priority: medium S-in-development Status: in development
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant