Working on Another Blog Update?

Having acquired a new server and reimplemented Jeremy’s web site, I ma starting on a rebuild of my own site, known to you as My aim with this to replace the lash-up of TclHTML, Python, Genshi and Kid with a nice, modern, Django site that (I hope) will not be obsolete for a good few years. The current prototype is at

All Change

There are all sorts of problems with maintaining a body of documents—in this case, my ‘Alleged Articles’—over several years. One of these problems is that I changed the format a couple of times. The old entries are XML, like so:

<!-- -*-HTML-*- -->
<entry date="19970611" icon="1997/19980529h-stamp.jpg">
  <h1>CAPTION96 Photo album</h1>
        This is <a href="">a selection of
        images</a> collected at the <a
        href="">CAPTION96</a> comics convention (in the
        summer of 1996). 
        Attentive readers will have noticed that there is almost a
        year-long gap between the con and the photo album.  This is partly
        explained by the amount a manual labour involved in scanning all
        those 7&times;5 photos on my none-too-fast scanner and moving the
        files from the Mac with the scanner to the Linux box with all my
        web site stuff on.

Hmm. Seems like my first ever blog entry was an apology for posting late. Anyway, I switched to using Markdown with RFC-2822-style headers:

Title: It's a bit like Markdown
Date: 20040424
Image: ../icon-64x64.png
Topics: pymarkdown tcl python markdown self

I have decided to change the way my home site works.  Up until now I
have been writing entries by creating a quasi-XML file containing the
HTML text;  I am changing  the format to be quasi-RFC-822: a text file
with a short header section at the top.  The text is translated to
HTML via the usual hacked-together nest of regexps.


The software has to recognise both formats. The nice thing is that nowadays this format is directly supported by Python Markdown and its Meta-Data extension.

Another subtler format change: up until May 2003 I published all the entries for on month on one page. When I wanted to write a longer article, the entry was a short summary with a link to the article. From June 2003, articles appear in full, and the monthly pages are synthesized by taking the first paragraph of the entry as the summary. This adds a little complexity as the older articles’ canonical URL follows a different convention from the newer ones, and I want to support the old URLs.

Navigation between articles has been fairly lousy in all the various incarnations of this site. I have—finally—added next/prev links between articles. After a few false starts I have managed to come up with a way to jump to old articles that is reasonably compact. In essence is is just a list of years with the current year expanded with a nested list of months and the current month expanded with a list of articles. This approach looks very stretched out when you give each list item its own row, so I fiddled with the CSS to lay out the years and months horizontally. I think this looks nicer. I hope it is still clear what is going on.

The other sort of navigation is via topics, which in deference to the current convention I now just show as tags. With my old static-HTML approach I never really got that working properly. The problem was I either needed one page per topic—which is a lot of scrappy little pages—or one monster page with the whole index in it (and perhaps some clever JavaScript to hide most of it). Allowing for the suer to select multiple tags would lead to a combinatorial explosion in the number of index pages.

The new Django-powered browse-by-tag page is dull but workable. You can narrow down your search by selecting more tags and widen it by deselecting some.


The main innovation in the style sheets for this version is that I am using downloadable fonts in the headings and the text. The @font-face kits are generated by Font Squirrel, and the fonts are free fonts:

I have tested these mostly on my Mac and a little on Microsoft Windows. (They look better with the anti-aliasing scheme used on Mac OS X than the ClearType algorithm used on current versions of Internet Explorer; IE9 will use a different algorithm called DirectWrite.) I hope it will not look too bad for people on older browsers—if it is downright illegible I may have to change things (again).

Not Finished Yet

There is a certain amount of URL-munging required to allow for the way some chunks of the site are being moved to their own domains or are being otherwise shuffled (e.g., to allow images to go on a separate static server). There are nuances to this that are still to be resolved. So it is not yet a drop-in replacement for the existing Sometime soon, I hope.