Improved RSS feeds
2025-11-12 23:57:00 +01:00 by Mark Smith

I discovered that my RSS feeds were rendering the title inside the description. Titles should go in the title field! I know I know. How embarrassing.
Honestly it’s some sort of miracle of miracles that I even have RSS feeds that work at all. When I wrote the static site generator, I figured out how to do serverside components using just regular javascript and ejs templates, and that was pretty cool. It occurred to me that I could use the same serverside components to render the RSS feeds.
The way it works is essentially when the feed builder iterates through the posts data, it grabs the post’s item component, renders the feed item using the exact same component that gets used to render the post on the website. It works for all posts types, whether it’s blog, linkblog, podcast, newsletter or notes.
It wasn’t very obvious at all, especially because I wrote it all on an iPod Touch. It was a rough few years. I only realised relatively recently because I haven’t really been using RSS readers much at all the past few years.
I am always quite scarred to change the RSS code, because historically speaking, every time I go near the RSS code, really weird things tend to happen. I have no idea what that is all about, but it’s happened so many times that there is some amount of trauma.
Anyways, I took a look at the code just now, and it wasn’t that bad. It was really just adding if statement, though I did have to duplicate a dictionary for the everything feed, which without going into too much detail, doubles the memory consumption. Seems to be rendering fine though. Hopefully it will look a bit less ugly in readers. #