Blosxom rocks
12th March 2003
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.
More recent articles
- Gemini 2.0 Flash: An outstanding multi-modal LLM with a sci-fi streaming mode - 11th December 2024
- ChatGPT Canvas can make API requests now, but it's complicated - 10th December 2024
- I can now run a GPT-4 class model on my laptop - 9th December 2024