still don't have a title

Perfection is Achieved When There is Nothing Left to Take Away

Written on 2021-03-24.

In 14 years since starting this blog, I changed the software several times, with each iteration simplifying requirements and setup.

Wordpress

In 2007, I started blogging. Back then I used a self-hosted Wordpress instance, running on my server. I was never really comfortable with the technology stack involved: a programming language I didn’t speak, a DB I had little experience with, a relatively heavy setup and of course, the occasional security issues related to that setup. All that just to have a somewhat dynamic website with pingbacks and comments generated by your visitors… totally worth it and exciting times! You wrote something to the “lazyweb” department and people would actually comment with useful advice!

Then came the spammers. First, it was just a little, and you could easily fight it off with the askimet plugin. Over the years, however the spam-to-useful-comments-ratio shifted to ridiculous levels and the comment section itself became a burden. Hosting the comments on a separate platform like disqus was not an option for me, so I finally turned the comments off.

Without the need for a comment section, the whole idea of storing mostly textual content in a DB just to have it served as a website, suddenly seemed like overkill and an unnecessary security risk. So I started looking for alternatives.

I wanted to maintain my content as plain text files. Text files are cool because they are future proof, portable and can be managed in git. Consequently, I was searching for a static site generator.

Pelican

Around 2016 I finally migrated away from Wordpress to Pelican. Pelican met all my requirements. I could store my content as plain Markdown files in a git repository. Pelican is written in Python, a language with which I’m very comfortable with. Pelican deals with blog posts and “pages” (i.e. non blog articles) and most importantly: Pelican just generates static HTML. So all that’s required on the server side is a simple web server.

Conveniently, it also comes with an importer that allowed me to export the content of my old Wordpress instance straight into Markdown files.

Migrating to Pelican was a huge relieve: I finally had a all my content as plain text in a git repository, my server was a lot more secure without the Wordpress instance running and removing MySQL freed up a lot of resources on that machine.

blag

Fast forward to 2021. While I was quite happy with Pelican, it still had too many features I don’t need. My blogging experience can be stripped down to a bunch of Markdown files that serve either as articles or pages, some static files, some templating for a decent design and an Atom feed. Particularly, I do not need pages/articles in multiple languages, a plugin system, support for multiple authors and tons of settings.

So I did what every self-respecting nerd would do: I wrote my own site generator. Not to write something better than Pelican, but rather something lesser. Something that does less while still being functionally adequate.

I called the result “blag”, named after the blag of the webcomic xkcd. blag is a blog-aware, static site generator written in Python. It supports the basic features you’d expect from a blog, like an archive, tags and an Atom feed. It converts Markdown (with fenced code blocks) and supports Jinja2 templating.

With this setup I’m quite happy for now. Maybe sometime there will be a simpler RSS/Atom-successor that does not require site-specific metadata (i.e. only stuff that can be generated from the articles themselves), so I could get rid of blag’s only required configuration.

This entry was tagged blag, blogging, markdown and python