YOCaml a framework used to describe static site generator

31 points by xvw


fiatjaf

This sounds interesting but I gave up trying to find an example of what the description of a website looks like.

I once made a static site generator called 'sitio' that was fully imperative and I think that's the best model, but haven't seen anything like that ever anywhere else, so I was thinking that this could be it but now I'm not sure.

The big idea is that you just write code that calls generatePage(path, template, content) and that's it. If you have a directory of Markdown files you read those, iterate, parse and call generatePage(), if you want something else that doesn't fit a normal website you generate that other page too. All very clear and explicit and infinitely flexible.

This is not a requirementbut in 'sitio' each page was also a React component so it was prerendered but could also be dynamic at runtime simultaneously.

Is there anything like this out there?