Someone interested in blogging asked me a while ago how my blog was put together; I told her “you really don’t want to know, you should probably just sign up for Typepad”. So today, I was trying to add a feature to the blog and (while trying to debug a plugin conflict) realised I’d forgotten what some of the pieces did. I went through and figured that all out again, and so mainly for my future reference here’s a new and updated colophon; some of this may prove useful to other blosxom bloggers.
Most of this blog is driven by blosxom, generating dynamic pages; the rest of it uses a Makefile, which is there mainly to create static copies of some heavily accessed files (e.g. feeds, since some of you readers have insane refresh intervals. You know who you are). Blosxom suits my particular blogging habits: I hate editing text in a web browser instead of XEmacs. And I’m perfectly happy writing everything to .txt files on disk, as I’ve found that there are often times I need to run Perl or sed scripts to do global edits, and I don’t really want to be bothered with pulling entries out of a database using SQL.
Blosxom relies heavily on a plugin and “flavour” architecture. This is both good and bad; good, because its modular design means you can easily customize it; and bad, because out of the box blosxom doesn’t do very much, and to get a somewhat conventional blog going, you pretty much have to customize it. Moreover, some of these plugins interfere with each other, and it can be a real headache figuring out their dependencies.
So here are the plugins that I find are absolutely essential (i.e. I wish their functionality had been built into blosxom):
- I used to use entries_index until I discovered this conflicted with my usage of $num_entries in the config plugin (see below), so I switched to entries_cache. Besides speeding up processing times, it also serves the invaluable purpose of locking down the modification time on stories. Hence I can go and fix a story.txt file at a later date without disrupting the order of stories presented. The down side is that if the modification cache file gets deleted – which I’ve done a few times, accidentally – you now have to reconstruct file modification times, which might be impossible unless the information is stored elsewhere (in my case, file naming convention: my story files are usually named MMDDYY.txt).
- Relative links tend not to work very well with blosxom, since slashes get introduced all over the place whenever you get entries grouped by month, day, or what have you; and relative links hence tend to break easily. Instead, I use paths relative to the root of levork.org that start with a slash, and rely upon the absolute plugin to change their paths appropriately depending on the context.
- I used to use the paginate plugin until I installed the calendar. I had to put up with the off-by-one error which created a bogus oldest entry dated in 1970 (this was particularly noticeable when it interacted with the find plugin, below). If I were to use this again I’d probably use the paginate_simple derivative instead, which should fix this problem.
To get my RSS feeds all working requires several plugins by themselves:
- The lastmodified plugin is used to provide RFC822 dates for my RSS 2.0 feed and ISO8601 dates for my RSS 1.0 feed. My version is modified (download here); the RFC822 encoding wasn’t quite correct (days aren’t 0-padded) and the ISO8601 encoding wrongly appended time zones to times which were already in Greenwich Mean Time.
- The config plugin is essential for making sure my feeds have the right number of entries, as well as turning off any plugins that don’t need to filter those feeds. This plugin allows me to create a config.rdf with:
$blosxom::num_entries=10;
while preserving the fact that the HTML flavour gets by with $num_entries=5.
- RSS stories are truncated using the foreshortened plugin. My version (download here) is slightly different from Rael’s; the stopping criterion is a fixed number of characters, rather than the first sentence.
- The rss10 plugin, as its documentation states, does all the work necessary to figure out the table of contents elements block necessary in a RSS 1.0 feed.
These plugins, as well as some of the ones below, are all used by my flavour files for RSS 2.0 (head.rss, story.rss) and RSS 1.0 (head.rdf, story.rdf, foot.rdf).
Other plugins add some common blog features:
- The calendar plugin provides the calendar you see on the upper left of each page. It’s extremely configurable and customizable using CSS, since there are “an (over)abundance of classes used”.
- The archives pulldown menu you see on the left below the calendar is created using my hacked up copy of the flatarchives plugin – it does just enough formatting to make it work wrapped with some Javascript in the head file of the HTML flavour.
- The find plugin, as you might expect, supplies the search box on the sidebar. It’s not terribly sophisticated but I find it useful every once in a blue moon.
- I don’t podcast, but I’ve attached some music files in a podcast-friendly format to my blog before, using Dave Slusher’s and Keith Irwin’s enclosures plugin.
Finally, some quirky plugins that only I find useful:
- My flavour files use a very basic file inclusion mechanism which replaces comments of the form with the contents of FILENAME. This is a legacy of the old way I used to do things with template files, and isn’t very interesting. The very simple plugin I wrote that drives this is called includer and can be downloaded here.
- Since this blog started I’ve written my blog entries with minimal markup. I have a script (download here) that processes this minimal markup and turns it into properly formatted HTML, saving me from having to worry about paragraphs, lists, and the interaction of those tags with tables or preformatted blocks; I now use a blosxom plugin version of this script to process my entries.
So there we have it. It’s certainly not the end user blogging experience I would foist upon my sister (who, by the way, started blogging again); however, after I figured out my plugin conflict, it took me all of five minutes to add the four flavour files (config.sitemap, head.sitemap, story.sitemap, foot.sitemap – note they depend on some plugins!) plus a Makefile rule that would properly generate properly formatted XML data for Google Sitemaps. Which is why I like it, warts and all.