6 ms·
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
by Fileformat 10mo 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.
- crazygringo 10mo agoYou 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 10mo agoYou 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 10mo agoTechnically, 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 10mo agoWho said "need"? He said "I want". You're moving the goalposts.
- Too 10mo agoApply that argument to any other file format and it quickly become absurd.