This blog is now static

October 12, 2020

For quite some time the fact that I relied on WordPress for maintaining this blog (even though it was technically self-hosted) bothered me. So I finally bit the bullet and converted it to a static version, containing all old content, with a new fresh design. In the process I wrote a tool to maintain it too, called SSST (the Simple Static Site Tool).

WordPress is huge, and I don’t really use a lot of its functionality. As such it creates an unnecessary dependency, and consumes more resources too. But I wanted to be able to use the blog like I am used to. For example, some posts contain mathematical equations, that should be rendered nicely. And I would like to allow comments as well, which is non trivial for a truly static site, especially if you do not want to outsource that part to some other online service. Finally, monthly archives and tag or category overview pages should still be automatically generated, and the overall structure should mimic the original WordPress structure to ensure existing pointers still point to the same page after the transition.

The first step was to get the original content out of my site using the WordPress export feature. This gave me a large XML file (in WordPress Extended RSS format) containing all posts with metadata and comments. With some one-shot scripts I converted this to directory tree with markdown files containing the posts and comments. Some manual fixing was required to clean up the markdown files (to straighten references to media).

With the sources resembling my old WordPress blog in place, I started developing SSST (the Simple Static Site Tool). It used pandoc to convert the markdown sources to the html structured posts to be pushed to the web server. It used pdflatex and pdf2svg to convert mathematical equations to scalable SVG images included inline in the posts. And it creates automatically generated reply links (using the mailto: scheme) that, when clicked, pop up an email composition window that allow the user to write and submit a comment (where the subject header is automatically filled with the path to the post or comment being replied to). After moderation, the comment is easily added to the blog and pushed to the server.

In case you spot any errors on this page, please notify me!
Or, leave a comment.