Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Blosxom rocks

I’ve been hearing a few good things about Blosxom recently, so a few days ago I decided to see what all the fuss was about. It’s a blogging tool, but it’s a very different species from the average system. Firstly, it’s only 282 lines of Perl (of which only 135 are actual code). Secondly, rather than having a web interface of some sort to add entries it runs entirely from the file system. You specify a data directory, then create entries by dropping .txt files in to that directory using your favourite text editor. The first line of each file is the title, the rest of the file is the entry, and the entry’s date is taken from the last-modified time of the file.

So far, so straight forward. Where it gets really clever is the template and category systems. To customise your basic blog you drop a head.html and foot.html file in to your data directory. To customise the display of entries, drop in a story.html file with a few simple replacement variables in it. Categories are again handled by the filesystem—you create directories (or nested subdirectories) for the categories you want and simply drop entries in to those directories instead of the top one.

Blosxom supports RSS straight out of the box, and can support any custom format you could possibly want thanks to its support for “flavours”—explained on the site. Pretty good for 150 lines of code!

I doubt I’ll switch over to using Blosxom myself, but the cleanness of its design combined with the ease with which it can be extended (Blosxom 2.0 has a very promising plugin architecture) make it an excellent choice for aspiring geek-bloggers. If I’d known about it before I started this blog I may well have used it (or a variant) instead of rolling my own. l.m.orchard is building Decafbad 2.0 around it and has already done some pretty exciting things.

I really like the approach of relying on the filesystem to do as much of the work as possible. I suppose most web developers who start with PHP (myself included) get stuck in to mySQL databases straight away and never realise quite how much you can do with a bunch of simple text files.

This is Blosxom rocks by Simon Willison, posted on 12th March 2003.

View blog reactions

Next: More lightweight software

Previous: Surviving Slashdot

5 comments

  1. Agreed, Bloxsom is relatively cool, but wondering how for example, fulltext search is going to work? Caching? It doesn't address any of this, and these are important issues if your blog is anything other than trivially visited, IMO. The concept of using existing (perfected) technology is a great one, though. I think Bloxsom is a good example of this. People tend to forget that the filesystem IS a database... one with lots and lots of tools available, for manipulating, backup, ... I'm new to the blog thing but so far I'm yet to find the featureset I really want. I guess I'll post it somewhere and hope someone is listening, because I don't have the time to build it myself. (This is a big step for me--my life up to now has been a series of "this sucks, I could build it better", and then I do, and then eventually others improve the original beyond my version. Of course my version was easy to make better at first, because I had so much prior art to criticize.)

    Ben Margolin - 13th March 2003 08:07 - #

  2. Good points. Caching is already implemented - I forgot to mention it, but blosxom come swith the ability to generate your blog as static HTML files rather than serving it dynamically. As for searching, it could be built as an external service using something like htdig. Blosxom definitely isn't the perfect solution (there's no way of elegantly supporting one entry in multiple categories for example) but it does an incredibly good job considering its size and simplicity.

    Simon Willison - 13th March 2003 08:53 - #

  3. I set up a quicky blog for trip-planning purposes, and decided on Blosxom. Easy to customize, with lots of cool plugins. Couldn't you just symlink posts to include them in multiple categories? I believe so.

    Micah - 13th March 2003 11:17 - #

  4. Neat - I hadn't thought of that.

    The Blosxom site mentions that it's great for providing blogs to multiple users - just set up a new directory for each user. Thinking about it, you could have a single global install of Blosxom and symlink directories in the global Blosxom data directory to directories in each user's home page, allowing them to update their blog by dropping files in their ~username/blog directory.

    Simon Willison - 13th March 2003 12:40 - #

  5. This plugin can make this works: Follow-Symlinks plugin for Blosxom.

    minghong - 12th July 2004 09:12 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2003/03/12/blosxomRocks

A django site