Exposing RSS even more
Post #6 published on by Tobias Fedder
I've just been reminded — again — that I should expose my RSS feed. Now if you read this, then you are probably one of the handful of RSS subscribers I got so far, and you might be asking: It's right there in the footer, on every page, behind that ugly unstyled bullet point, and you want to expose it even more‽
You have a point; there is already a link in the footer, quickly available to every reader, scaring away the curious yet untaught, innocent souls that dare to click it with a wall of XML. But that isn't the kind of exposure I've been reminded of. This is about RSS auto‐discovery, exposing RSS to machines.
Enabling RSS auto‐discovery for a website is just a <link>
element in the <head>
that I add to my base template file.
⋮
<head>
⋮
<link rel="alternate" href="{{ '/blog_feed.xml' | prependProtoAndFqdn }}" type="application/rss+xml" title="Tobi's ramblings about the web and stuff">
⋮
</head>
⋮
So easy, it's almost inexcusable that it took me that long. Especially when I consider the path to my feed /blog_feed.xml
. Some people or apps seem to guess common paths like /feed.xml
, /feed.json
, /atom.xml
or /rss.xml
, but with mine, there is no chance. I envision having more than one feed in the (far, far) future, and I didn't want to give the appearance one of them would be the default feed. But so far its path is just an additional hurdle, that can now be bypassed thanks to metadata in the <head>
.
The first time I read about RSS auto‐discovery was in the 5th issue of Own Your Web from Matthias Ott. Every issue contains a section with links to interesting and useful webpages and one of them was Robb Knight's blog post Please, Expose your RSS. I thought I should definitely add that to my base.njk
template and my blog post about generating this blog with 11ty. But, although there were only a few days between learning about it and the final polish of that post of mine, I forgot.
After bringing this website online I added its feed to my RSS app and then I remembered that I could have done that with less than half the amount of characters, if I had setup RSS auto‐discovery. I made a mental note. And I lost it shortly after. Then a few hours ago Chris Coyier posted Exposed RSS, also motivated by Robb Knight's original blog post. Funnily enough I saw that one on Bluesky first, minutes before the notification from my RSS app popped up. Right, that's a really low hanging fruit that I still haven't tried to reach, I thought, good that I made a ToDo for that. But a quick check revealed, that I did not write a ToDo for that, again. Now before I'll forget once again, this time I was sitting in front of my computer anyway, so I just added that single line to my template. Done.
Thanks to everyone telling me what to do over and over again. That's why I am subscribed to your feeds after all. I guess that is the beauty of the web blog bubble, right?