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 http://www.alleged.org.uk/pdc/. 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 http://next.alleged.org.uk/pdc/.
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> <body> <p> This is <a href="http://caption.org/1996/pdc/">a selection of images</a> collected at the <a href="http://caption.org/1996/">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×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. </p> </body> </entry>
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. …
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 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:
- Gentium Basic by Victor Gaultney for body text
- Yanone Kaffeesatz by Yanone for headings
- Whitehall by Vic Fieger: for the ‘Alleged Articles’ heading
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 www.alleged.org.uk. Sometime soon, I hope.