Glowbug Tag Archives
2/5/2025 8:59 am | Share to:
Last night I began the work of adding tag based archives to the blog. For example, my "social post" tag is meant for me to use whenever I write a quick post here which is also sent out to my Bluesky and Mastodon accounts. For that tag specifically the idea is you could have this page bookmarked and basically get a (somewhat) complete feed of my social posts.
The functionality also lays the groundwork for an eventual "photolog" view, where you'd just see a page which are photo posts I made where the photo is the focus.
The functionality has a lot of benefits, and it's been on the backlog for years. I've never gotten around to it. And, the reality is. It isn't complex to add, there isn't a lot of new logic needed. The work breaks down to:
- Create the template file
- Add a section to the publish code which does the actual publishing and making of files
- Add tag archive links to the archive page
- Add administration tools for selecting which tags get their own archives
There's obviously more to each step, but that is generally the process.
So, step one. The template is very similar to what I use for the date archives. I just made a few small tweaks and introduced a new template tag for placing the tag name on the page. So the top can say "Posts tagged: [Insert tag]".
Check. Easy.
Step two, adding the section to publishing. This should also be fairly easy, it's basically the same code as I use for date archives. Except... something isn't right. I copied the Dates archive section and went through to modify it. And then when I began testing it wasn't working. I tried to bugfix it for about an hour and couldn't find where my error was. I rolled it back and stopped there for the night.
So, we're on the cusp of adding that functionality to the blog. I'll get back to it tonight, likely. But, not there yet.