2024-07-15
I wanted a very simple system to produce a static site for my homepage and blog. I tried many things out, learned a little, wasted a lot of time, and finally settled on a surprisingly simple and satisfying solution, made of:
My requirements were:
Pandoc is a universal document converter. It happens to be coded in Haskell, but is widely available in binary form. It is in fact used by many static site generators for the Markdown to HTML conversion, so why not cut through the noise and use it directly?
I have lately been enjoying the speed and simplicity of being close to the metal when programming in C with nvim and a terminal, and was reminded of the power of GNU make.
Both pandoc and make happened to already be installed on my computer, but if necessary they can be installed, e.g. on Arch Linux, with:
sudo pacman -S pandoc make
Then all I need to do is write my pages and posts in Markdown, using nvim, and run make. Because it’s a static site, I can preview it by opening the index.html in Firefox. Then I deploy the generated pages directly with surge.
This system is what I use to publish this site. The source is available on darcs hub. All you actually need is the Makefile.