Re: Pyblosxom permalinks are not permanent
seanh <[email protected]> Mon, 20 Jul 2009 14:11:23 +0100
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 17, 2009 at 8:50 PM, will<[email protected]> wrote: > seanh wrote: > PyBlosxom lets you use whatever permalink format you want to use. The > format you want to use depends on how you do your blog. If categories are > fixed, then you can use a category based permalink. If mtimes are fixed, > use that. If you want some third thing, you can write a plugin to do it > however you want. Actually, can you even link to a particular post by date? I think you can link to a day, month or year, but not a post. So it looks like it's either categories as permalinks or writing a plugin to do it another way. I'm not sure how best to write a plugin for this. Lets say we want some sort of permalink IDs that are independent of either category or date. We could use the filename or a #slug metadata line. Either way I see two difficulties: 1. the user could potentially create non-unique IDs and 2. I think the plugin would need to build an index of the IDs in order to be able to respond to permalink requests quickly enough. One way it could work is similar to the rdate utility. Before publishing content to your blog you run a 'slug' script that adds unique, short #slug metadata lines to any of your posts that don't already have them. These could be numeric or based on the post title or filename (with numbers added for uniqueness of necessary). The script also creates an index of slugs. A pyblosxom plugin then uses this index to handle requests for posts via their slugs. I dunno, feels inelegant. Perhaps keeping categories fixed is better. ------------------------------------------------------------------------------ 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