tlienart / Franklin.jl

(yet another) static site generator. Simple, customisable, fast, maths with KaTeX, code evaluation, optional pre-rendering, in Julia.
https://franklinjl.org
MIT License
951 stars 113 forks source link

Franklin + Literate, allow multiple environments #528

Open tlienart opened 4 years ago

tlienart commented 4 years ago

At the moment a "Franklin site" is considered as one environment, upon "serving" the environment is activated and everything is done in it.

For tutorial websites you might want each tutorial to have its own (esp if a tutorial depends on big stuff like Flux or whatever)

devmotion commented 3 years ago

I use pinned environments for all of my literate scripts, and therefore I would be very interested if one could use specific environments. Maybe one could use the same behaviour as IJulia and always activate (and instantiate?) a package environment if a Project.toml file is present in the same directory as the script? Or add a configuration option that would allow to specify the path to the environment and probably should be set to the root directory of the webpage as default?

tlienart commented 3 years ago

Yes your suggestions are good ones thanks! a slightly weird alternative could also be to have a load_environment function which would take the path of a given Project.toml file which the user could put anywhere they like so it doesn't mess the organisation of their scripts. I need a bit of time to figure this out which path makes most sense and then a bit more time to implement it 😄