top | item 45877948

(no title)

Fileformat | 3 months ago

Huh? How would a static site generator serve both RSS and the HTML view of the RSS from the same file?

To be extra clear: I want to have <a href="feed.xml">My RSS Feed</a> link on my blog so everyone can find my feed. I also want users who don't know about RSS to see something other than a wall of plain-text XML.

discuss

order

crazygringo|3 months ago

You don't serve them from the same file. You serve them from separate files.

As I mention in my other comment to you, I don't know why you want an RSS file to be viewable. That's not an expected behavior. RSS is for aggregators to consume, not for viewing.

cxr|3 months ago

You are being obnoxiously and unreasonably dismissive. Just because you declared they're wrong or that something is a certain way doesn't make it so.

> I don't know why you want an RSS file to be viewable.

Well, spend two seconds thinking about it. Or just, like, read what they wrote.

FateOfNations|3 months ago

Technically, the web server can do content negotiation based on Accept headers with static files. But… In theory, you shouldn't need a direct link to the RSS feed on your web page. Most feed readers support a link-alternate in the HTML header:

<link rel="alternate" type="application/rss+xml" title="Blog Posts" href="/feed.xml">

Someone who wants to subscribe can just drop example.com/blog in to the feed reader and it will do the right thing. The "RSS Feed" interactive link then could go to a HTML web page with instructions for subscribing and/or a preview.

cxr|3 months ago

Who said "need"? He said "I want".

You're moving the goalposts.

Too|3 months ago

Apply that argument to any other file format and it quickly become absurd.