How to: Implement an RSS feed with Hugo
Here is a guide to help you add an RSS feed to your Hugo blog.
1. Edit the config.toml file:
a. Make sure the baseURL is valid (e.g. "https://leahchung.netlify.com")
b. Add the following lines:
[outputs]
home = [ "RSS", "HTML"]
[outputFormats]
[outputFormats.RSS]
mediatype = "application/rss"
baseName = "rss"
a. Add the following line:
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
I added this in my 'header-widget' div, but this will depend on your theme.
4. Add the following to the top of each post markdown file:
layout: rss