Smarter Site Navigation

Today’s “Creation” for NaCreSoMo is a bit of infrastructure for my blog—something that most people wouldn’t notice, but that’s bothered me for a while. These three links go to the same post—or do they?

What’s different? Only the links at the top showing the previous and next post.

What’s different in the URL? The second and third links have a tag field in the query string part of the URL. Until today, that’s just been extra text, completely ignored. Now, however, it specifies that the “previous” and “next” links should be relative to that tag, rather than the general category.

Why is this important? Most of the time when looking at a certain post, it’s better to be able to move back and forth within a category—posts about life events don’t get mixed up with creative works, and all my Cambodia posts stay together. A lot of times, though, I find myself trying to look through all posts with a certain tag, such as Gender or Lord of the Rings—or NaCreSoMo.1

And until now, that’s been a problem: you can get the list of posts, but once you click through to a particular post, the “previous” and “next” links are to whatever’s previous or next in the category, not in the tag. These links were usually completely unrelated posts and didn’t cross category boundaries. Now, when you access a post through a tag index, the “previous” and “next” links refer to the previous and next post in the tag, and thus are actually useful for this workflow.

So, if you’re disappointed by the lack of traditional creative content in this post, I invite you to look through everything else I’ve created for NaCreSoMo, and the previous/next links should Just Work™.

P.S. The night began with me trying to update to the latest version of Jekyll, the software that generates my site. Unfortunately, it seems like a lot has changed since I last updated, and it basically broke all my custom modifications. Guess I’ll try again another day.

  1. If you’re curious, you can see the list of all tags I’ve ever used on this site. ↩︎