jekyll / jekyll-feed

:memo: A Jekyll plugin to generate an Atom (RSS-like) feed of your Jekyll posts
MIT License
847 stars 204 forks source link

What should the path to the RSS feed be? #4

Closed benbalter closed 9 years ago

benbalter commented 9 years ago

Theoretically, as long as it's exposed in the page metadata, it doesn't matter to computers.

I'm personally a fan of /feed/ (rendered as feed/index.xml), because pretty permalinks.

I've also seen rss.xml, atom.xml, and feed.xml, which seem less intuitive to me (going to a site, I can guess /feed, just as I might guess /about, but /atom.xml seems a bit more opaque).

The other issue to consider, most servers default configuration will look to index.xml after index.html (and serve the proper doctype), but there are some edge cases where it may not (GitHub Pages supports XML indexes for pretty permalinks).

Last, it feels silly, but we could theoretically say "all of the above" and render the same template into multiple spots (redirect-from isn't an option here, because redirect headers).

pathawks commented 9 years ago

I don’t know how important a pretty permalink is for a feed. How often would a user need to type the URL? Once?

With respect to avoiding config bloat, it seems reasonable to allow the user to specify a path for the feed. If migrating to Jekyll from somewhere else, it would be A Good Thing to avoid breaking the old feed.

parkr commented 9 years ago

I see /feed.xml on most sites. As long as the header is specified on the main page of the site, most RSS readers will figure out the location. I'd be :+1: for /feed.xml due to the incidence of its use on blogs I visit. What does WordPress do?

parkr commented 9 years ago

If migrating to Jekyll from somewhere else, it would be A Good Thing to avoid breaking the old feed.

This should be mitigated by the headers in the HTML, yeah? I really don't want to further complication configuration for Jekyll lest we end up like mutt, which needs http://muttrcbuilder.org for most to get started.

pathawks commented 9 years ago

This should be mitigated by the headers in the HTML, yeah?

The way that sort of autodiscovery works is, when I subscribe to a feed in my feed reader, the feed reader will fetch the URL that I entered and (1) if it is a feed, it will store that URL as the canonical location of the feed or (2) if it is an HTML page, it will find the URL of the feed from the autodiscovery tags, and then store that URL as the canonical location of the feed.

Either way, what the feed reader remembers is just the URL of the feed. If that URL 404s, none of the feed readers that I have used have been sophisticated enough to go looking to see if there is a new feed in a new location. They will not check the autodiscovery headers of the HTML. They will (at best) report the 404 or (at worst) just silently forget about the feed.

What does WordPress do?

/?feed=rss2 or /feed/ or /feed - RSS 2.0

But, WordPress also allows requesting other formats:

XhmikosR commented 9 years ago

Personally, I use rss.xml but non pretty permalink in this case is fine IMO.

benbalter commented 9 years ago

I'm personally persuaded by @parkr's /feed.xml arguments (which is what is currently implemented), and believe I was the only one insane enough to care about pretty permalinks for machine-readable data, but please feel free to continue to weigh in, as it's an easy change.