Published 2025-08-20
When I set up this blog on BSD, I started out using cmark. I didn’t want to invest in jekyll, hugo, or any of the other whole-static-site generators. I wanted to invest in small, focused tools, surrounded by shell scripts. For a short while I even entertained using bashblog, but I couldn’t quite make it work the way I wanted.
I tried poking around with lowdown and thought it could help me build an rss feed but it turned out to be no better than cmark.
Finally, I realized pandoc was sitting right there. It would take in most formats I wanted and produce any number of results I wanted, so I decided to adopt it instead.
Pandoc produces very nice standalone HTML documents, but some of it was… missing something… when I’d manage the headers and footers manually, only relying on pandoc to handle the inner markdown. For instance, my block quotes were “only” indented – they had no vertical bar or other indicator it was a separate reference. That made me suspect I was doing something wrong, especially when I could see nicer formatting on websites like this.
Turns out, I needed to build my own template. Pandoc keeps all of its default templates as internal representations, so you can’t just edit a file and change the defaults. However, pandoc very helpfully allows you to emit those default templates for yourself:
pandoc --print-default-template html > html.template
Once I did that, I was able to add my own edits and modify my script accordingly. Now it looks much cleaner and has plenty of (useful) added style.
P.S. – Tweaking templates in pandoc has me considering what it would take to generate an RSS feed from the data, with XSLT styling too.