A new blogging engine#

For quite a while (especially since I became a dad) my blog was inactive. The old one was based on ikiwiki and it lacked a clean deployment workflow.

For several months I was looking for a suitable replacement which would satisfy my requirements:

  • Compiles Markdown or ReStructuredText to static HTML

  • The whole source-code of the site can be stored in git, no database required

  • Supports a simple build, preferably a single CLI command to build the whole site

  • Extendable with plugins (if built-in features are lacking things like a gallery)

  • Written in Python because most of my work (payed and unpaid) is done in this language

  • Packages for Debian so I can easily deploy it on my infrastructure

Several candidates would fit those requirements:

In the end I decided to opt for Sphinx as it provided a good blogging solution in the form of ABlog. Getting started on Debian is as easy as installing it:

sudo apt install python3-sphinx-ablog

Afterwards start a new project, creating a basic Sphinx structure:

ablog start

The deployment is done by pushing to a Git repository with a custom post-update hook which builds the whole project using sphinx. It then places the files in the webserver document root directory. I will describe this hook script here in a future post.