Setting up MT archives

By Oli
At 1:16 AM · Friday, 8 August · 2003
To Weblogging

I’ve decided to switch from numerical to date+title URLs for individual pages. This should make archives more accessible, and easier to ‘URL-hack’. I also made a mistake when importing, and presently it looks like I’ve posted twice as many stories as I actually have ;-)

I’ve followed advice from Mark Pilgrim’s Dive Into Mark templates, although I got amusingly confused because I was on the MT ‘editing templates’ page at the time, which contains the same phrases as the Configuration > Archiving page I should have been on. The joys of being a newbie. More information about changing from numerical to date+title or date+time URLs is available at PoeticGeek, although I’d note that the URLs there contain a lot of cruft (What is cruft? read Matthew Thomas’ article When Good Interfaces Go Crufty). There’s also another method to achieve date+time on Mar Orlygsson using regex - looks hardcore :-)

Update: I tried to modify Mark’s templates to make the monthly URLs not end in anything, but got this error when rebuilding:

Renaming tempfile ‘/oli/2003/08/.new’ failed: Renaming ‘/oli/2003/08/.new’ to ‘/oli/2003/08/’ failed: Not a directory

D’oh - I was in effect telling MT to make an archive file without a filename. I’ve added Mark’s “index” back in, but left off the “.html”. Now I’ll have to find how to make links to monthly indexes just show up as directories. This post is also a test of the “dirify” option - can I still use HTML in my titles?

Discussion...

Comments (0)