Open jberger opened 4 years ago
So, in addition to following URLs to get the dynamically-generated pages, copy all the files/directories in the $app->static
object into the appropriate place? That's a really good idea. This should probably also then include any static files embedded in modules / base64-encoded. Any file that can be reached via the static renderer.
Further, this should probably happen by default. I can't think of any reason why someone would not want it to happen, and if there comes a reason in the future, someone can request an --exclude-branch
or --exclude-match
option or config or something.
I'd have to look to see if its possible to find all in-module files or not, but assuming you can then yeah that makes sense too. I've made the assumption of it being a default behavior in RevealJS; I agree I can't think if when you wouldn't want it.
Oooh, looks like this should do it: https://mojolicious.org/perldoc/Mojo/Loader#data_section
When the application runs as a "dynamic" website, it still often has its own static content which must be served. For the exporter for Mojolicious::Plugin::RevealJS I walk the list of available static directories and copy them into the proper location for the static render. Might something like that be possible for this plugin as well?
https://github.com/jberger/Mojolicious-Plugin-RevealJS/blob/82c8045202f7fbfc0b2118ddfec7a12a87920868/lib/Mojolicious/Plugin/RevealJS.pm#L137-L139