7 ms·
Speaking of advocating RSS, I was trying out Nikola [0] for static site generation and found that they have a really nice-looking RSS end-point [1] that is view
by gudzpoz 2y ago
Speaking of advocating RSS, I was trying out Nikola [0] for static site generation and found that they have a really nice-looking RSS end-point [1] that is viewable both from the browser and an RSS reader. Looking into the XML, it turns out it's called xml-stylesheet:
<?xml-stylesheet type="text/xsl" href="assets/xml/rss.xsl" media="all"?>
And I would argue that this is an excellent way to introduce new readers to RSS: instead of the browser popping up a download prompt, you can make your RSS feeds themselves a dedicated page for advocating RSS, in case an interested reader is browsing through the links on your site.
[0] https://getnikola.com/ https://getnikola.com/
[1] https://getnikola.com/rss.xml https://getnikola.com/rss.xml (Open it in your browser!)
[2] https://github.com/getnikola/nikola/blob/master/nikola/data/themes/base/assets/xml/rss.xsl https://github.com/getnikola/nikola/blob/master/nikola/data/...
- christkv 2y agoMan what a blast from the past. There was a moment in time where xml and xlst was considered the bright future of webapps
- phh 2y agoI remember writing a blog with xml + xslt and thought it was very cool. Retrospectively, writing code in XML, eewwww, but back then I liked writing XHTML by hand
- PeterStuer 2y agoMy suggestion for best practice would be to have a feed endpoint that is as minimal and clean as possible, and provide a separate endpoint (can be the same base url but with a parameter) for human consumption. This ensures maximal compatibility and ease of consumption for both machine and human.
- alifeee 2y agoI disagree, you can have an XML feed that does both For example: https://andrewstiefel.com/feed.xml https://andrewstiefel.com/feed.xml
- yakshaving_jgt 2y agoThis is brilliant. Thanks for sharing.
- PeterStuer 2y agoYes, and if everything is properly configured that is great. Where is falls apart is when your site host/admin slaps Cloudflare protection on the domain and forgets to properly exclude the RSS pages, then programs can't fetch the feed without resorting to anti-bot evasion tech scraping, and are left with rendered HTML instead of the actual feed and have to deal with that. Niche? It happens far more than you think.
- darekkay 2y agoI've once blogged about this technique, in case someone wants to learn more about it: https://darekkay.com/blog/rss-styling/ https://darekkay.com/blog/rss-styling/
- pl4nty 2y agothanks, really appreciate that your post was concise and included examples/followups. only needed 10 minutes to style my own rss feed