Blosxom: Less is More

January 22, 2008

Blosxom, a lightweight weblog program written in Perl, is a minimalist’s paradise. It embodies elegant simplicity both in terms of design and implementation. The version 2 core weighs in under 500 lines of Perl but despite it’s size it is highly extendable.

In this document I describe how I use Blosxom on this site and how I have extended it, through the use of several plugins, to serve MathML.


When I recently restructured and redesigned this site I had several goals in mind. I wanted to write posts as Markdown-formatted plain text files with inline LaTeX representations of mathematical expressions. I wanted to allow comments and trackbacks and provide full-content Atom feeds for entries and comments. I also wanted the structure of the site to be somewhere between that of a traditional static site and a weblog. Some pages should appear on the main page in chronological order and others should only be accessible through direct links from other posts or from the archives.

Now, if I want to write posts containing LaTeX expressions, then I need to render them somehow. Rather than call LaTeX and generate images for those expressions, I wanted to convert them to MathML. Presently MathML must be embedded in XHTML and all such pages must validate. If I am generating valid XHTML+MathML+SVG pages, then I get inline SVG for free.

I actually tried out many different mainstream programs and a few more esoteric ones and found that they could easily satisfy most of the requirements. However, I also found that getting any existing package to convert LaTeX to MathML and serve it properly was going to require some work.1

Ultimately, from the universe of weblog programs and content management systems, I ended up choosing Blosxom2 and I have since managed to implement all of the above requirements. Naturally, now I have to start writing about it. In some cases, this was as simple as installing an existing plugin. Other times I had to roll my own.

By now I have modified almost every plugin I use in some way,3 but that’s actually one of the best parts. You can take a vanilla Blosxom setup and do pretty much anything you want with it. Everything about Blosxom is hackable—usually without needing to modify Blosxom itself.

In the following I list some of the notable plugins that I use. Where possible, I have linked to the plugin’s homepage. In some cases, there are many versions of a plugin floating around but there is no clear home. In these cases the plugin can usually be obtained at the Unofficial Blosxom User Group’s plugin repository or the Blosxom CVS repository.

Blosxom Basics

Perhaps my favorite thing about Blosxom is that all posts are stored as simple flat files in a directory hierarchy. Each directory represents a category and categories can be nested simply by creating subdirectories.

Each post can be presented in various flavours with each flavour being denoted by its corresponding file extension. HTML, XHTML, plain text, and RSS are all examples of flavours one could define. Flavours need not correspond directly to a particular format though. When a particular post is requested, template files corresponding to the given flavour are loaded and the post is formatted accordingly.

First, there are a couple of “essential” plugins:

I store a good bit of metadata with each post and several other plugins I use need to access that metadata as well as the page title. These plugins help process that metadata:


I tend to write longer, more permanent posts that easily lend themselves to a hierarchical structure (e.g., short HOWTOs and homepages for my open source projects). From the outside, I’d like these pages to be organized like most static websites: with a categorical directory hierarchy. I also want my weblog entries to be organized in this way. However, I also wanted to provide lists of recent entries, feeds, and so on like most weblogs. Here are a few plugins I use to support this site structure:

Processing Content

If I write and store content in Markdown-formatted plain-text files, I need plugins to process that content and convert it to XHTML before it’s sent to a browser. Here are a few plugins that help with this:

These plugins assist in converting inline LaTeX to MathML and handle named entities:

As I mentioned, since I am serving valid XHTML+MathML+SVG documents, I can include inline SVG graphics:

Serving Content

In order to ensure that supporting browsers are able to render pages containing MathML and SVG, I need to make sure it is served with the correct mime type to each browser:

Finally, there are a couple plugins I use for efficiency and speed:

Feedback and Syndication

  1. That is, any existing weblog software. Instiki does this beautifully, but it’s a Wiki.

  2. I must admit a slight bias toward Blosxom. I started using it just over two years ago when I started the previous version of this weblog. However, when I first began planning to restructure the site I had fully convinced myself to switch to something else.

  3. I have actually hacked on things so much that I am now am terrified that one day someone might actually release a new version of Blosxom. Luckily everything is in Bazaar so I can back out patches if necessary.