Don't Back Down

Posted by Chad Everett on August 17, 2003

Link Changes »

I've been updating the method for specifying URLs throughout the site this morning. In general, this means that instead of page names such as 000001.html, you will see link_changes.html. In practice, this should mean nothing to you, and you may not even notice a change. Hopefully you will not notice the change, anyway!

One place you may notice a change is on the old archives. These old links will continue to exist for a while, at least - however they will not be updated any longer. Each of the "old" archive pages has been updated to include a link to the new URL for that page. In this way, you should be able to find your way to the new page if you end up on the old one somehow. If you find your way there through a bookmark or search engine, please update any bookmarks you may have with the new URL.

Why am I doing this? Much of the reason is because it seems like a good idea. I'm all for usability, and being able to look at a somewhat-useful page name has to be better than trying to figure out what the link to 000001.html might mean. Instead of an archive link like:

http://cxliv.org/2003/07/000016.html

You will be able to use:

http://cxliv.org/2003/07/07/dont_back_down_history.html

You'll notice that you can now drill down to the category and see all posts within, and eventually there will also be index pages at the year, month and day level within each archive (those aren't done just yet, but I wanted to get started). This was all done pretty easily through Movable Type by using the Archive functions. Just specify a new template name, and away we go. I then added the same information to the old page format and recreated those archives. Done!

Mark Pilgrim has put together some good information on making such a change. He actually makes use of "slugs", or short names for his pages. I generally prefer a slightly longer title, but I am indeed using a similar method for naming. Typically the name will come from the entry title by using: <$MTEntryTitle dirify="1"$>. If I don't quite like the title as a filename, however, or if there are special characters that don't translate well into a filename, I'll make use of the keywords and a slightly different tag: <$MTEntryKeywords$>.

All of this is made possible through the use of Brad Choate's excellent MTIfEmpty plugin for Movable Type. This plugin allows you to check the value of a variable (in this case, EntryKeywords) and set the output value accordingly. It's pretty similar to DaylightOrStandard plugin that I use to control the timezone being output - but instead of Daylight or Standard time, it checks the value of a particular field in an entry.

Finally, I am currently generating full feed RSS documents for the site. This is so that anyone who is archiving entries will be able to get the updated URLs in their aggregator. I know this makes the file much larger - but I feel like it's the best thing to do in this case. I will only continue for a week, at which point I will return to sending only the most recent 6 entries in each feed.

If you find any problems, please let me know!

Related Entries

Post a comment