There are plenty of guides on adding an RSS feed to your Eleventy site. This little post covers two extracurricular points that are often missing from those guides.
Subscribe from anywhere#
Suppose someone finds your site example.net and wants to subscribe to its RSS feed. This relies on them knowing the full feed URL, which can be ambiguous.
You can solve this issue by adding a
<link> to your site’s
<head> on the base template.
<link> points RSS readers to the exact location of the RSS feed.
That person can now search their RSS reader for example.net (or example.net/foo) and it will still find the RSS feed.
Open feed directly in RSS reader#
Safari has a nice feature where feed links (like this one) open directly in an RSS reader . There’s a strange quirk though on iOS Safari (as of writing this) where an Atom feed will instead link straight to a page full of raw XML.
So, if you’re particular like me, use the RSS sample feed template from the Eleventy RSS Plugin. Not the Atom one. Just be sure to update the
type line from earlier to
This CSS-Tricks post article by Farai Gandiya demystified some of the grander mysteries (and histories!) of web feeds for me. The W3C Feed Validation Service helped me check the health of my feed as I tinkered.
Contingent on the visitor having an RSS app installed. Which I think is almost always the case now on macOS and iOS with the built-in News app. ↩︎