This blog is now static

October 12, 2020
3

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.
Kris Shrishak
, 2020-11-01
(reply)

Dear Jaap-Henk Hoepman,

Thank you for this tool. I noticed that the code in the Git repo does not generate the home page.

I receive the following error message while executing make_home():

FileNotFoundError: [Errno 2] No such file or directory: ‘public/index.tmp’

I am using Python 3.8 on Ubuntu 18.04.

Best, Kris

Jaap-Henk Hoepman
, 2020-11-02
(reply)

Dear Kris,

Thank you for notifying me. In the future, please report bugs or any other issues directly as an issue on the SSST github repository.

Conno Boel
, 2020-11-07
(reply)

Cool, I’ll check it out later! Bryan Lunduke was talking about staic sites as well, and my current homepage is static anyways. It should be nice to have a blog there besides the one i have on a new initiative social media (its called locals, and apparently it is very controversial) cannot hurt ot have a completely self hosted static alternative :) Get Outlook for Android