Getting started with RSS feeds

I’ve carefully read the RSS Template documentation, however I’m still a bit confused, possibly because I’m missing some prior knowledge.

Here’s what I understand so far:

1. Include RSS link in header

{{ if .RSSLink }}
  <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
  <link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}

.RSSLink variable is defined automatically by Hugo. This snippet will let Hugo know I want RSS entries created for each post.

2. Put an RSS link for subscription

When people click on this link, they’ll be able to subscribe to the RSS feed?

<a href="{{ .URL }}" type="application/rss+xml" target="_blank">{{ .SomeText }}</a>

Alternatively, should they also be able to just copy the URL of my site into an RSS feed manager like Feedly and Feedly will figure out if I have RSS enabled or not? Or do I have to do something else to enable people to subscribe to the feed?

Links to example websites and code would be appreciated.

An “RSS feed” is just a text file that a feed reader polls (goes and downloads occasionally). We have standardized ways to include feeds in the header (the link elements you are referring to).

If your feed is valid, and linked to in the header, it will work as expected for everyone.

As for linking, just link to the RSS feed and folks will process it however they have their system configured to deal with it. For instance, some folks have a local feed reader that can pick up RSS from web browsers, and that works for them. I personally have Firefox set to subscribe to feeds via NewsBlur automatically, just by clicking on a feed.


The documentation for RSS is out of date. I don’t have time to go into details, but have created this issue to track it: