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

First iteration: generate static website from static routes #2

Open
essenciary opened this issue Oct 7, 2024 · 0 comments
Open

First iteration: generate static website from static routes #2

essenciary opened this issue Oct 7, 2024 · 0 comments
Assignees

Comments

@essenciary
Copy link
Member

This is the simplest scenario.

[ ] Users add GenieStatic to their app/project
[ ] Then they call GenieStatic.build passing the path where they want to generate the static website
[ ] GenieStatic.build iterates over Genie.Router.routes() and pulls the full page at the route's URL (using HTTP.jl, taking into account the method [ie GET, POST, etc])
--> would it make sense to only include GET by default? We should research what other static generators do. But it doesn't make a lot of sense to include non-GET routes, as these are for creating/updating/deleting.
[ ] GenieStatic.build saves the pulled page creating the correct folders path if it doesn't exist (ex path /a/b/c should create folders "a", "b", "c"). If the route does not indicate a document name, the page should be saved as index.html
[ ] When it's done pulling and saving the pages, GenieStatic.build should copy the /public folder into the root of the saved website

@KwatMDPhD KwatMDPhD self-assigned this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants