apropos

Feed syndication is really easy, as it turns out

RSS is dead. Long live RSS.

I recently switched this website over to Hakyll, and in the process considered setting up an auto-generated RSS feed. I ultimately decided against it because I like pushing works-in-progress and it ran a little bit against the “minimal” feel I wanted working on my website to have.

My website should be no more than a bundle of HTML floating in the void, supported / suspended by links by the rest of the web. No fancy site generation: I want templates, and Markdown support, and MathML support, and that’s it. Could I just hand-write my RSS feed? Is that doable?

Turns out, yes. While RSS is terrifying and I recommend anyone thinking of using it to reconsider, Atom’s quite nice. Use Atom. Seriously. I did not appreciate Atom until I started reading through both standards. Atom is way simpler: and cute, and aesthetic, and etc etc etc.

Here is a minimal viable Atom feed. It happens to be the feed of this website.

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>jj blog</title>
<author>
    <name>JJ</name>
</author>
<id>https://toki.la/posts</id>
<updated>2024-07-25T00:00:00-08:00</updated>
<entry>
    <title>Feed syndication is really easy, as it turns out</title>
    <id>https://toki.la/posts/atom</id>
    <link href="https://toki.la/posts/atom"/>
    <updated>2024-07-25T00:00:00-08:00</updated>
</entry>
<!-- additional entries... -->
</feed>

Pretty much all you need to know about Atom is in the (tiny) specification. I’ve described the important bits informally below. Also – the W3C maintains an Atom (and RSS) feed verifier.

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<!-- an atom:feed element MUST contain EXACTLY one atom:title element -->
<title>jj blog</title>
<!-- an atom:feed element MUST contain EXACTLY one atom:id element -->
<id>https://toki.la/posts</id>
<!-- an atom:feed element MUST contain EXACTLY one atom:updated element -->
<updated>2024-07-25T00:00:00-08:00</updated>
<!-- an atom:feed element MUST contain AT LEAST one top-level atom:author -->
<!-- element, OR in every atom:entry AT LEAST one atom:author element -->
<author>
    <!-- an atom:author element MUST contain EXACTLY one atom:name element -->
    <name>JJ</name>
    <!-- an atom:author element MAY contain AT MOST one atom:uri element -->
    <uri>https://toki.la</uri>
    <!-- an atom:email element MAY contain AT MOST one atom:email element -->
    <uri>jj@toki.la</uri>
</author>
<!-- an atom:feed element SHOULD contain EXACTLY one atom:link element
     with rel="self", indicating the URI for retrieving this feed -->
<link href="https://toki.la/posts/atom.xml" rel="self"/>
<link href="https://toki.la/posts"/>
<!-- an atom:feed element MAY contain AT MOST one atom:subtitle element -->
<subtitle>my webbed site</subtitle>
<!-- an atom:feed element MAY contain AT MOST one atom:icon element -->
<icon>https://toki.la/assets/light.png</icon> <!-- that SHOULD be 1:1 -->
<!-- an atom:feed element MAY contain AT MOST one atom:logo element -->
<logo>https://toki.la/assets/mr-bones.jpg</logo> <!-- that SHOULD be 2:1 -->
<!--
o  atom:feed elements MAY contain ANY NUMBER of atom:category elements.
o  atom:feed elements MAY contain ANY NUMBER of atom:contributor elements.
o  atom:feed elements MAY contain AT MOST one atom:generator element.
o  atom:feed elements MAY contain AT MOST one atom:rights element.
-->
<entry>
    <!-- an atom:entry element MUST contain EXACTLY one atom:title element -->
    <title>Feed syndication is really easy, as it turns out</title>
    <!-- an atom:entry element MUST contain EXACTLY one atom:id element -->
    <id>https://toki.la/posts/atom</id>
    <!-- an atom:entry element MUST contain EXACTLY one atom:content element,
         OR (AT LEAST one) atom:link element with rel="alternate" -->
    <link href="https://toki.la/posts/atom"/>
    <!-- an atom:entry element MUST contain EXACTLY one atom:updated element -->
    <updated>2024-07-25T00:00:00-08:00</updated>
    <!--
    o  an atom:entry element MAY contain ANY NUMBER of atom:category elements
    o  an atom:entry element MAY contain ANY NUMBER of atom:contributor elements
    o  an atom:entry element MAY contain AT MOST one atom:published element
    o  an atom:entry element MAY contain AT MOST one atom:rights element
    o  an atom:entry element MAY contain AT MOST one atom:source element
    o  an atom:entry element MAY contain AT MOST one atom:summary element
    -->
</entry>
<!-- additional entries... -->
</feed>

Cheers. Syndicate your posts! Nothing’s beaten feed syndication, for quite a lot of us.
And if you’re looking for an aggregator, I do quite recommend Fraidycat.