<?xml version="1.0" encoding="utf-8"?>
  <rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:georss="http://www.georss.org/georss"
    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
  >
    <channel>
      <title>Piccalilli - Content syndication topic archive</title>
      <link>https://piccalil.li/</link>
      <atom:link href="https://piccalil.li/category/content-syndication.xml" rel="self" type="application/rss+xml" />
      <description>We are Piccalilli. A publication dedicated to providing high quality educational content to level up your front-end skills.</description>
      <language>en-GB</language>
      <copyright>Piccalilli - Content syndication topic archive 2026</copyright>
      <docs>https://www.rssboard.org/rss-specification</docs>
      <pubDate>Mon, 13 Apr 2026 14:02:37 GMT</pubDate>
      <lastBuildDate>Mon, 13 Apr 2026 14:02:37 GMT</lastBuildDate>

      
      <item>
        <title>A quick guide to creating syndication feeds</title>
        <link>https://piccalil.li/blog/a-quick-guide-to-creating-syndication-feeds/?ref=content-syndication-category-rss-feed</link>
        <dc:creator><![CDATA[Declan Chidlow]]></dc:creator>
        <pubDate>Thu, 02 Apr 2026 11:55:00 GMT</pubDate>
        <guid isPermaLink="true">https://piccalil.li/blog/a-quick-guide-to-creating-syndication-feeds/?ref=content-syndication-category-rss-feed</guid>
        <description><![CDATA[<p>News of RSS' death following the <a href="https://en.wikipedia.org/wiki/Google_Reader#Discontinuation">demise of Google Reader</a> has been greatly exaggerated. RSS is alive, well, and as omnipresent as ever. You aren't properly publishing content on the web if you aren't also publishing in syndication formats.</p>
<p>This is a general guide designed to help you understand, build, and distribute various formats of web feeds, even if you've never touched them before. We're not going to run through all the uses and details of syndication feeds, because they've been covered ad nauseam elsewhere. Instead, this article is designed to act as a reference which focuses on the principles of various feed formats so that people can subscribe to your content.</p>
<p>Consider this your article as a point of entry, or reference cheat-sheet.</p>
<div><h2>FYI</h2>
<p>In most cases, you won't need to hand-roll your own feeds. Most tools you encounter already have functionality for generating them automatically, but understanding them is to your strength.</p>
<p>This knowledge doesn't just apply to creating feeds but also parsing them and using them. In any case, when things go awry, actually understanding the formats will help you get back on track.</p>
</div>
<h2>RSS</h2>
<p>RSS has the best support out of any feed format but is also the oldest and has some design issues that can make it unideal. RSS files should be served with the MIME type <code>application/rss+xml</code>. For an example of a full RSS feed, you can view the feed for <a href="https://piccalil.li/the-index/">The Index</a>: <a href="https://piccalil.li/the-index/feed.xml">https://piccalil.li/the-index/feed.xml</a></p>
<h3>Boilerplate</h3>
<p>Like all of the formats this article will be discussing, RSS is just text. In this case, structured XML. RSS wraps everything in an <code>&lt;rss&gt;</code> tag with a version number, and then a single <code>&lt;channel&gt;</code> tag, which all of our RSS content will be held within.</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;rss version="2.0"&gt;
  &lt;channel&gt;
  &lt;/channel&gt;
&lt;/rss&gt;
</code></pre>
<h3>Metadata</h3>
<p>Before listing our articles, we need to describe the feed itself. We are required to have at least a <code>title</code>, <code>link</code>, and <code>description</code>, like so:</p>
<pre><code>&lt;title&gt;Name of our feed&lt;/title&gt;
&lt;link&gt;https://example.com&lt;/link&gt;
&lt;description&gt;A short description of the feed.&lt;/description&gt;
</code></pre>
<p>However, there are also many additional optional values we can include: <code>language</code>, <code>copyright</code>, <code>managingEditor</code>, <code>webMaster</code>, <code>pubDate</code>, <code>lastBuildDate</code>, <code>category</code>, <code>generator</code>, <code>docs</code>, <code>cloud</code>, <code>ttl</code>, <code>image</code>, <code>rating</code>, <code>textInput</code>, <code>skipHours</code>, <code>skipDays</code>.</p>
<p>Dates in RSS conform to <a href="https://www.w3.org/Protocols/rfc822/#z28">RFC-822</a>. This means they look like this: <code>Tue, 11 Jun 2024 15:00:00 GMT</code>. Though RFC-822 does permit two-digit years, four digits are widely preferred.</p>
<h3>Items</h3>
<p>Items are the individual entries in your RSS feed, whether they be posts or something else. There are two schools of thought for what content should be included here. One follows the idea that feeds should contain the entire content, unabridged. Others think that feeds should only contain a summary of the content and that it should be read on the site. The preference differs by user, but there is no downside to supplying both if you wish.</p>
<p>The items are the meat of the feed. You loop through your posts and output an item for each one. In RSS, each post is an <code>&lt;item&gt;</code>. All elements in an item are optional, but you must have at least a title or description.</p>
<pre><code>&lt;item&gt;
  &lt;title&gt;A quick and easy guide to Markdown&lt;/title&gt;
  &lt;link&gt;https://piccalil.li/blog/markdown-guide/&lt;/link&gt;
  &lt;pubDate&gt;Tue, 11 Jun 2024 15:00:00 GMT&lt;/pubDate&gt;
  &lt;description&gt;This is the summary of the post...&lt;/description&gt;
&lt;/item&gt;
</code></pre>
<p>As a word on etiquette, don't publish items with future dates. Most feed readers will just omit them, but some will display them at the top, which is attention-grabbing. Many users consider this bad manners and will probably unsubscribe.</p>
<p></p>
<h2>Atom</h2>
<p>Like RSS, Atom is XML-based, but is a little bit stricter and more finely specced than RSS, which makes it slightly less forgiving to author, but much nicer to parse. Atom files should be served with the MIME type <code>application/atom+xml</code>.</p>
<p>You can see a full example of an Atom feed <a href="https://sample-feeds.rowanmanning.com/examples/64968fb0e3685ef07a3e2a27b8d64c01/feed.xml">here</a>.</p>
<h3>Boilerplate</h3>
<p>Atom uses a root <code>&lt;feed&gt;</code> element and requires an XML namespace (<code>xmlns</code>).</p>
<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;feed xmlns="http://www.w3.org/2005/Atom"&gt;
&lt;/feed&gt;
</code></pre>
<h3>Metadata</h3>
<p>You need an <code>id</code>, <code>title</code>, and an <code>updated</code> timestamp. The homepage URL is often used for the <code>id</code> value. <code>author</code> is also required, unless every single entry has an <code>author</code> value.</p>
<p>Atom dates are written in accordance with <a href="https://www.rfc-editor.org/rfc/rfc3339">RFC-3339</a>, which is based on ISO-8601, and looks like this: <code>2024-06-11T15:00:00Z</code>.</p>
<pre><code>&lt;title&gt;Piccalilli&lt;/title&gt;
&lt;link href="https://piccalil.li/"/&gt;
&lt;updated&gt;2024-06-11T15:00:00Z&lt;/updated&gt;
&lt;id&gt;https://piccalil.li/&lt;/id&gt;
&lt;author&gt;
  &lt;name&gt;Andy Bell&lt;/name&gt;
&lt;/author&gt;
</code></pre>
<h3>Entries</h3>
<p>In Atom, each post is an <code>&lt;entry&gt;</code>. Only <code>id</code>, <code>title</code>, and <code>updated</code> value are required, though you can optionally include <code>author</code>, <code>content</code>, <code>link</code>, <code>summary</code>, <code>category</code>, <code>contributor</code>, <code>published</code>, <code>rights</code>, and <code>source</code>. <code>id</code> must be unique for the entry and must not change.</p>
<pre><code>&lt;entry&gt;
  &lt;title&gt;A quick and easy guide to Markdown&lt;/title&gt;
  &lt;link href="https://piccalil.li/blog/markdown-guide/"/&gt;
  &lt;id&gt;https://piccalil.li/blog/markdown-guide/&lt;/id&gt;
  &lt;updated&gt;2024-06-11T15:00:00Z&lt;/updated&gt;
  &lt;summary&gt;This is the summary...&lt;/summary&gt;
&lt;/entry&gt;
</code></pre>
<h2>JSON Feed</h2>
<p>JSON Feed is the newest format discussed here and, as the name suggests, is JSON based rather than XML based. JSON Feed files should be served with the MIME type <code>application/feed+json</code>.</p>
<p>For an example of a JSON Feed, you can view the one for posts on my personal website: <a href="https://vale.rocks/posts/feed.json">https://vale.rocks/posts/feed.json</a></p>
<h3>Boilerplate and metadata</h3>
<p>JSON Feed doesn't have much boilerplate compared to RSS and Atom. You must create an object, and that object must contain the JSON Feed version and a <code>title</code>. Though there are many optional values, many of which you should include: <code>home_page_url</code>, <code>feed_url</code>, <code>description</code>, <code>user_comment</code>, <code>next_url</code>, <code>icon</code>, <code>favicon</code>, <code>authors</code>, <code>language</code>, <code>expired</code>, and <code>hubs</code>.</p>
<pre><code>{
	"version": "https://jsonfeed.org/version/1.1",
	"title": "My Blog"
}
</code></pre>
<h2>Items</h2>
<p>Items is represented as an array. The only truly required values are <code>id</code> — which uniquely identifies the item — and <code>content_html</code> and/or <code>content_text</code>. The optional values are <code>url</code>, <code>external_url</code>, <code>title</code>, <code>summary</code>, <code>image</code>, <code>banner_image</code>, <code>date_published</code>, <code>date_modified</code>, <code>authors</code>, <code>tags</code>, and <code>language</code>.</p>
<p>You can also provide attachments on an item.</p>
<pre><code>"items": [
    {
        "id": "1",
        "content_text": "This is an item in the feed.",
        "url": "https://example.org/item-one"
    }
]
</code></pre>
<h2>Auto-discovery</h2>
<p>Many feed readers and other tools can automatically detect your feeds if you configure them correctly. You should add <code>&lt;link&gt;</code> tags to the <code>&lt;head&gt;</code> of your HTML to aide discovery.</p>
<pre><code>&lt;link rel="alternate" type="application/rss+xml" title="My Site's RSS Feed" href="https://example.com/rss.xml" /&gt;
&lt;link rel="alternate" type="application/atom+xml" title="My Site's Atom Feed" href="https://example.com/atom.xml" /&gt;
&lt;link rel="alternate" type="application/feed+json" title="My Site's JSON Feed" href="https://example.com/feed.json" /&gt;
</code></pre>
<p>Different tools interpret these tags differently. Some feed readers will, for example, provide users with the choice to select what feed they want from the provided options. Others will pick the first valid feed in the list, or pick the last. There is, unfortunately, very little consistency.</p>
<p></p>
<h2>Implementation gotchas</h2>
<p>Feeds are consumed by all sorts of tools in all sorts of contexts, so what works in one case might cause issues in another. It is important to stick close to the specs and consider defensive precautions.</p>
<h3>Relative content</h3>
<p>Feed readers are disconnected from your site. Relative links like <code>&lt;img src="/images/cat.jpg"&gt;</code> will often break because they are not relative to the website. Some feed readers may work around this problem, but you should convert all links (images, anchors, etc) to full, absolute URLs to ensure they work in all contexts.</p>
<h3>Encoding</h3>
<p>One of XML's most notorious attributes is that it is rather fragile. For example, if your blog post title is <code>Tips &amp; Tricks</code>, and you put that raw into XML, it breaks:</p>
<pre><code>&lt;title&gt;Tips &amp; Tricks&lt;/title&gt;
</code></pre>
<p>This is due to the <code>&amp;</code> character being reserved. For cases like this, you have two main options:</p>
<ol>
<li>
<p><strong>Entity Escaping</strong> <br />
Convert special characters to their HTML entities.</p>
<pre><code>&lt;title&gt;Tips &amp;amp; Tricks&lt;/title&gt;
</code></pre>
</li>
<li>
<p><strong>CDATA</strong> <br />
Wrap the whole thing in a CDATA block. This tells the XML parser, 'Ignore everything inside here. It's literally just text', which is great for the body of your content where you have lots of HTML tags and special characters, where it might be laborious to transform them.</p>
<pre><code>&lt;description&gt;
  &lt;![CDATA[
    &lt;p&gt;Here are my &lt;strong&gt;Tips &amp; Tricks&lt;/strong&gt;...&lt;/p&gt;
  ]]&gt;
&lt;/description&gt;
</code></pre>
</li>
</ol>
<h3>Feed access controls</h3>
<p>We often configure bot and scraping protection on our sites, but in this case we <em>want</em> our feeds to be scraped. We also likely want to make images and other resources able to be displayed in readers, so we may need to relax our protections. Our sites are also often served cached. Ensure your caching policy aligns with your feed updates — there is no point updating a feed if the cache means it won't reach readers!</p>
<p>Something else worth keeping in mind are security policies, such as CORS. While feeds are usually fetched server-side by aggregators, some web-based feed readers fetch feeds directly via the browser. Setting an <code>Access-Control-Allow-Origin: *</code> header on your XML/JSON files ensures these web-based clients don't get blocked by security policies.</p>

<p><a href="https://www.blogsareback.com/guides/enable-cors?platform=Netlify">There’s a great resource here</a> to help you with CORS, by the browser-based RSS reader, <a href="https://www.blogsareback.com/">Blogs Are Back</a>.</p>

<h3>Limited display</h3>
<p>Many feed readers only display certain elements, such as text, images, and blockquotes, then apply their own formatting. This makes proper semantic HTML important, because non-semantic elements will not be understood or styled by readers.</p>
<p>The removal of provided formatting could cause issues if your content is complex or dynamic. In such a case, it can be worth only providing a summary or incorporating a notice directly into your feed noting that the content is best viewed on the web.</p>
<h2>Validation and testing your feeds</h2>
<p>Checking your feeds are proper by eye can be tricky, which is where validators are valuable.</p>
<ul>
<li>For RSS and Atom, you can use the <a href="https://validator.w3.org/feed/">W3C Feed Validation Service</a>.</li>
<li>For JSON Feeds, you can use the <a href="https://validator.jsonfeed.org/">JSON Feed Validator</a>.</li>
</ul>
<p>These validators will catch those pesky date format errors and unescaped content instantly. There are also many libraries and other tools out there that you can incorporate as part of your processes so that broken feeds are caught before they can hit production.</p>
<p>You should also try opening your feeds in a few feed readers and other syndication feed tools, just to confirm all works without issue — much like you already test a website across a few browsers.</p>
<h2>Wrapping up</h2>
<p>This article has only skipped along the top of the syndication feed ocean but has hopefully given you a level of knowledge ready to start building feeds. Having feeds for your content is not just vital for distribution but also contributes to a strong and healthy web.</p>
<p>If you're looking to dive deep into the feed ocean, these further reading links will hopefully provide you with some solid entry points:</p>
<ul>
<li><a href="https://www.rssboard.org/rss-specification">RSS 2.0 Specification</a></li>
<li><a href="https://validator.w3.org/feed/docs/atom.html">Introduction to Atom</a></li>
<li><a href="https://www.rfc-editor.org/rfc/rfc4287">RFC 4287: The Atom Syndication Format</a></li>
<li><a href="https://www.jsonfeed.org/version/1.1/">JSON Feed Version 1.1 Explainer</a></li>
</ul>
        
        ]]></description>
        
      </item>
    
    </channel>
  </rss>
