A return to simple stupid writing

I like to write a blog, I also like to play with frameworks. Combining these two activities has been the most wasteful activity for the last few years, from Hugo to Jekyll to Gatsby to Svelte and beyond.

If you want to write, you do not also want to contend with the peculiarities of a web framework which will waste time for little pay off; instead time travel to 2006 when a tool called Pandoc was released by John MacFarlane 1

Of the numerous options available for conversion, Pandoc can convert markdown to html. Write some basic markdown in a folder, run a script, and deploy the html to Netlify or whatever static host and move on.

That’s all you need, bash and pandoc.

Pandoc can be run on CI with the docker image if required but that is overhead.

If you have a folder of markdown, then a simple bash script like this can for example add in styles, an optional footer and even grab citations from bib files.

for s in posts/*.md; do pandoc "$s" -c style.css -A footer.html --toc --toc  -t html -s --metadata link-citations $(echo $bibs) --csl=$csl --citeproc > "output/$(basename ${s%.md}.html)"; done