My new minimal static site generator

7 points by rbr


rbr

I like the design of the author's SSG, in particular, the idea to just copy over all files, except for some files. In the author's case, HTML files. In my case, the exempted files are mako templates (= files with a .mako template), which allows for lightweight interleaving of python and content. I think this approach of copying over everything, and special casing some files, is good for making small and intuitive SSGs.

I was a bit surprised to read the annoyance with parsing markdown. It's not misplaced, and from a dependency minimization point of view it makes sense. But depending on a markdown parser (or a markdown toolkit like Pandoc is pretty acceptable generally IMHO. But I can see the appeal of only depending on a C compiler, too.

In my case I'm depending on pandoc for inferfacing with Markdown. While it's been easy and pleasant to use, it has made my SSG compilation step slow, about 20 seconds. This is not so nice when I'm changing my site and I need a few tries to get it right... The temptation to build a build system is so strong 😄

spc476

What I don't understand is why people store blog entries in Markdown instead of the rendered HTML. If you ever decide to switch to a different Markdown parsers/renderer, there stands a good chance of it not being 100% compatible with the old one.

I finally broke down (after almost 20 years) and now use a markup language (not Markdown) instead of writing HTML by hand for my blog, but still store entries as rendered HTML. That way, I can make changes to how my markup language works (and I have made perhaps half a dozen incompatible changes to the syntax) without having to fix past entries, or fix past entries.