Skip to content

First iteration: generate static website from static routes #2

@essenciary

Description

@essenciary

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions