Tidying Up the Blog
This post covers a recent update with some technical detail on my workflow. If that sounds interesting, read on. If not, the main point is that you can now browse the blog chronologically by year using the links in the home page’s right sidebar or at the bottom of the highlights page.
So, just a couple months ago, in my post about migrating to the Rusty Typewriter theme, I mentioned that there were still a few things I’d like to do after the migration. I did make a couple small changes soon after (e.g., arranging the categories alphabetically). A more ambitious one, though, was to reorganise the blog so that I had one subdirectory for each year (2026, 2025, etc.), which would do two things for me. First, it would make it more convenient for visitors to browse the site chronologically. The way Hugo works is that each subdirectory under the main content folder is treated as a group with an automatically-generated index page for each of them, with the name of the subdirectory forming part of the URL. Additionally, my theme will generate a breadcrumb link. See, for example, this URL, which leads to the 2026 index: https://itsollkorrect.com/blog/2026/
Also, this arrangement would make the blog far easier to manage for me. When I migrated from WordPress, even though WP used the date as part of the URL for each post, the tool I used flattened every post into a single directory. So, if I wanted to update the home or highlights pages (as I do with almost every update), I’d have to scroll through a list of 410 other posts. Logically, the fix is easy enough – every post has the publication date as part of its front matter, so there’s no question of which directory each post should go in. However, doing this manually would be extremely tedious, so even though I’ve wanted to do this ever since the migration, I never got around to it.
However, as mentioned in the Rusty Typewriter post, I’ve been experimenting more and more with AI, and this task seemed well suited for it. I began with the Claude application (for which I have a free plan, so just chat; no cowork mode, Claude Code, etc.), telling it exactly what I wanted, asking a few questions, and having it generate a plan. Since the chat can’t access my filesystem to see the specifics of my site, I loaded up some API credits, opened Zed and its Claude integration, and had it review and revise the plan in light of exactly how my blog is set up. The process from there was straightforward; I created a new git branch, fixed a few broken links it had found, had Claude move the posts and update the template so that next/previous post buttons could navigate between folders, and add the Archive list to the home page’s sidebar, with commits between each step.
To my surprise, Claude found a missing post while checking for broken links. It’s not one I think I’d have deleted, so somehow it must have been lost in the shuffle during the WP to Hugo migration. Luckily, I have a backup of the WP site, so I should be able to restore it. It also found a few references to the old “Recommended Reading” page, but I’d removed that one deliberately.
That’s great, but there was one more major tidying project I wanted to do while I was cleaning house, and that was to rectify the disaster that was my images folder.
The way I handle images now is to create a subdirectory under the year (so far, just 2026) called, simply enough, “images,” and I save the images used in that year’s posts there. Easy.
The way WordPress handled images, and thus the way they were exported, was to put every image in one giant folder. Not great, but it gets much worse. Whenever I uploaded an image to WordPress, I’d often crop or resize it a few times until it fit within the post exactly how I wanted. WordPress would save a copy of every single version of the image, so if a post has, say, three illustrations, I could end up with a dozen saved images. For a few years, I included a picture with almost every post. Though I have a generous amount of storage available on my site, the mess and the massive amount of wasted space irritated me.
So, monsieur Claude went back to work. In total, it found 424 images in use in the content/images folder (it didn’t count content/2026/images, since they were already known good), totalling 139 MB. As for orphaned images, it found 3,054 of them, totalling 391 MB. It also found a couple broken image links which were easily fixed. Oddly, I also noticed some images I have no memory of ever using in a post. Admittedly, I’ve been running this blog for nineteen years so maybe I just forgot, but then, they are orphans. I did recognise a couple old avatars, though, so my guess is that when the blog was new and I was still active on online forums, I hosted some of my avatars here rather than on an image-hosting website.
Anyway, these were all deleted, and my librarian brain is now satisfied at my nice, orderly directories. I suppose I could go another step and move the images into the year folders for the posts that link to them, but this would be a lot of extra work for no practical gain.
For those curious, I spent almost four dollars in API credits on the reorganisation, then just under three dollars more in identifying and deleting orphaned images, which was worth it, in my opinion. After mentioning this in a Fediverse post, a couple friends suggested that I try a cheaper Chinese model next time, or even a local model, since this is something they should be able to do. I’ve had little success in my few experiments with local models, but I’ll freely concede that may be a skill issue. I’ll likely try one or both of those strategies at some point.
Now that everything was in order locally, it was time to upload. In the past, I’ve always liked FileZilla for updating the blog, but recently I started looking for an application with a proper sync function to help avoid orphaned or outdated files. I know there are ways to do this on the command line, but I prefer a two-pane GUI for this so I can easily visually compare what I have locally and remote. I’ve tried Cyberduck previously, but found it slightly annoying. Instead, I’ve mostly settled on Forklift. It had to work a long time in comparing the huge number of files on each side of the transaction; the initial estimate was two hours and forty-five minutes to sync 23,924 items. The actual upload stalled a couple times (or at least appeared to in the interface), but it “only” took about forty-five minutes or so.
When it finished I clicked around for a while, everything worked as expected, so I merged my work into the main git branch. Shortly before writing this I updated the Highlights page to link to each year’s index.
So, that’s that. I think the only large-scale project I’d like to do is to clean up my tags and categories. As I noted in “So Long, WordPress!,” I’m proud of how well my taxonomy has held up, but I suspect there are some near-duplicate tags, posts that could use additional tags, and so on. Another good project for AI, perhaps.