I would like to make a static blog, i.e. locally generated HTML and CSS files and then uploaded on the web server.
I have following minimal requirements:
FLOSS tool in OCaml
Tool easy to install from opam
Ready to use by default, any cosmetic configuration can be done later. I’m not much interested in visual appearance even if I’ll probably do my own tweaking at some point
Input in markdown format with images (my previous blog was with Dotclear and I have a conversion of the posts in Hugo format)
Ability to pretty print code would be a plus
Tagging system on each blog post
Date on each blog post
Sensible URL generation scheme, possible tweaking would be a plus
Ability to have draft blog posts would be a plus
Ability to publish blog posts at a given date would be a plus
Local rendering to check blog result, in automatic update mode if possible
Ability to generate indexes by year, tag, …
Good performance (low rendering time, rendering only modified content, …) would be a plus
I probably could do my own system but I’m pretty sure it already exists. Any suggestions?
It should pretty much cover most (or all?) of your requirements. You have to go through the docs to figure out how.
Ready to use by default, any cosmetic configuration can be done later. I’m not much interested in visual appearance even if I’ll probably do my own tweaking at some point
Yes this exists. Your styling tweaks would involve only plain old CSS, nothing else.
If you’re looking for a simpler approach, you can probably get by by writing your own as a bespoke generator (framed as an alternative to making a general purpose framework/tool).
For example, the PLSE website at my university (nus-plse.github.io) is a static site automatically generated using OCaml, and using yaml and markdown as input.
At the root of the project, I have a dune-file which copies over static files and invokes a “generator.exe” binary that will walk a data directory (containing yaml files) and generate corresponding static files in the output directory:
All in all, it took me a couple of days to write the whole thing, and it’s been running without problem for ~2 years now (even now that the maintenance of the data on the site is handled by others).
My tool finch meets most of these requirements. I think it is much more Hugo/Jekyll-like than YOCaml or Soupault. It should be easy for you to add any features you need, it’s <600 lines of straightforward OCaml.