Comment

Comment by chrismorgan

You can very practically make this viewable in normal web browsers if you give it an XSLT stylesheet, and preferably use <content type="xhtml"> instead of <content type="html"> so that you don’t even need any JavaScript to unescape things (grumble grumble, disable-output-escaping, grumble grumble, messy unmaintained XML pipelines with ancient feature support, grumble grumble).

Here’s a sample, having taken this feed.xml, switched it to <content type="xhtml">, and added my own stylesheet: https://temp.chrismorgan.info/2024-05-04-hn-40246841.xml

There’s all kinds of fun stuff you can then add, such as pagination as you get more entries, rather than just deleting old ones. I’d suggest adding actual links using the fragment and xml:id attribute (mapped to HTML id in the stylesheet), but that wouldn’t play nicely with pagination shifting entries.

You can even do things like publish an Atom entry document for each entry, so they have their own paths, but that that URL is still an Atom document. Basically, if you want to, you can completely realistically have a full blog where everything is in Atom containers instead of HTML containers.

parent chrismorgan 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton