Pyblosxom permalinks are not permanent

seanh <[email protected]> Fri, 17 Jul 2009 18:36:51 +0100
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
Hi,

I believe that PyBlosxom (and blosxoms generally) have a fairly
serious issue with permalinks.

Correct me if I'm wrong, but PyBlosxom provides two ways to link
directly to a particular post: by category or by date. One or the
other of these is what's usually referred to as a "permalink" in
PyBlosxom blogs. But neither of these things is permanent at all.
Re-categorise a post, which doesn't seem unusual or unreasonable, and
that permalink is broken. Edit a post and, since PyBlosxom updates the
date, that permalink is broken.

This is terrible, right? Broken links everywhere.

As a file-system based weblog engine the file path seems like the
natural thing to use as a unique identifier. But I feel that this is
probably a mistake in the same way that it's a mistake to use the
mtime as the date of a post even if it seems like the natural thing to
do. There are several plugins that do dates in a different way, but I
don't see any to fix permalinks.

Solutions?

Never re-categorise a post. You could use tags instead, and can change
those without breaking the permalinks. I think additional tools are
necessary to make tags manageable though. PyBlosxom isn't very good at
tags though because it's filesystem-based and the filesystem doesn't
do tags. Without a lot of custom scripting you aren't going to get tag
auto-completion and suggestion, splitting, joining, renaming and
deleting tags, etc.

Jekyll [1] has a neat way of doing it. The user can specify, in the
configuration file, what the format of permalinks should be based on
various metadata about the post: date, title, and categories.

[1]: http://wiki.github.com/mojombo/jekyll/permalinks

Use unchanging "published" dates. PyBlosxom can already do this. In
combination with one of the plugins that prevents the date from being
modified when you edit a post, that ought to fix it. I think PyBlosxom
could do with a plugin that lets a post have both a published date and
a modified date. The original published date never changes and can be
used as a permalink, the modified date changes and can be used to
inform readers of when the post was last modified.

Wordpress seems to put original publication dates in permalinks also,
followed by a user-configurable "slug", e.g. 2009/05/23/hello-world.
"hello-world" is not the title of the post (or the categories or
tags), it's a slug that's there purely for the purpose of the
permalink. Change the slug and (in theory) you've broken the
permalink, although in fact if you visit an old slug wordpress seems
to be able to redirect you to the new one. Still, even without the
redirect, this enables you to edit, rename and re-categorise a post,
the only thing you mustn't change is the slug.

PyBlosxom could do slugs using a #slug metadata line in each post
file. A slight problem is that you're expecting the user to come up
with unique slugs, but you have no way of telling them, when they're
just typing the slug in their text editor, that it's not unique.
Another problem is that when a visitor requests a slug PyBlosxom would
have to inspect the contents of every post file, so clearly some sort
of index or cache is going to be needed.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge