Hello,
I am writing a blog website in Julia. I want it to be an essentially static Markdown website, but with support for authentication and dynamically generated web pages. Because of this, existing static website generators like Franklin.jl don’t work. I also don’t want all of the baggage of something like Genie.jl. For now my solution is just rendering the pages using MarkdownLiteral and separate functions and then caching and serving them using PyJulia.
Is there a better existing way?
Hi @nev!
I think best practice is to serve static website files statically with a web-server, and dynamic otherwise. For “semi-static” I guess you separate the two and do both, so I’m not sure you should rule out Franklin for the static part of the website. But I’m not expert, I just wanted to welcome you.
I know Genie likely has the most mindshare (of pure-Julia), and also see (what you could have googled):
Many of those there don’t seem maintained, except for e.g. (those two I’ve seen before, but I wouldn’t know which to recommend, or any), Dance mentions serving static files, which I guess you can always do:
I’m very much believe in Genie and its future, and related projects, so what do you have against it?
I think you’re implying you want a “micro-framework” (Flask-like, what are you currently using in Python using?), not complex (I guess Genie is more complex, claiming fully-featured), as:
You can use Python solutions, and with PyJulia, but also considers using it with PythonCall.jl/JuliaCall. If you do that, then it’s still not clear what will be in Julia, and why are you “writing a blog website in Julia”? I mean not (just) opposed to in another language, but rather reusing something already built?
Oxygen.jl is supposed to be (relatively) pretty lightweight, and has support for static page rendering too.
As @digital_carver already mentioned, I would also go for https://github.com/ndortega/Oxygen.jl, it is under active development and has way better documentation than e.g. Bukdu.
I used both and I’m pretty happy with Oxygen now.
To elaborate, pages are generated dynamically in Julia, cached in multiple revisions by the Python side and served through Flask.
If I used Genie.jl, all of the MVC stuff would just go unused. Oxygen does seem to be what I want, thank you.