Asking for feedback on support for serving up static sites with a plugin #221
jaredcwhite
started this conversation in
General
Replies: 2 comments 1 reply
-
I can see this potentially being useful for my own experimental static site generator built on Roda, but I haven't had time to actually confirm that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@adam12 I didn't look super closely, but I believe in your case when the Roda server is booted up you're serving view HTML directly as you build it on-demand, rather than first writing the static files out to the public folder and expecting those to get served up by Roda. So I'm not sure if this plugin would immediately apply to your needs, but it could be worth the investigation. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
(originally posted on the Google Groups list)
Hi all,
I posted earlier about some changes I made to the "public" plugin, and Jeremy suggested making it a separate plugin which uses the public plugin as a dependency, and we're looking for community feedback regarding if it should be part of Roda.
#216
The use case for this is you can't serve a static site with Roda just with the public plugin. For static sites it's typical to have URLs like /path/to/page which can resolve to either path/to/page.html or path/to/page/index.html — this is commonly known as "pretty URLs". In the Bridgetown project which has adopted Roda for both a dev server supporting the static output as well as dynamic routes in dev and production (using Roda's typical routing features), we had to patch or otherwise change public plugin's behavior to enable this.
Rather than alter public, PR #216 adds "pretty_public" which works just like public but adds support for pretty URLs along with a few configuration options (if you want to support .htm, .txt, whatever).
Thoughts? Questions?
Beta Was this translation helpful? Give feedback.
All reactions