Configure Hugo XML Output for RSS Feed
Jun 28, 2024
Why
I have a mysql db that will be used to store values read from the rss feed of my hugo site. I need some add some keys to help with organization
Parts of this series
Resources
RSS Config
Copy over the posts/rss.xml file from your theme
From hugo root you would do something like...
&& &&
Modify the rss.xml file
Add post id
Hugo supports a hash of the files path. It is not always unique... but for my purposes it will likely be good enough.
{{ .File.UniqueID }}
Add the author's name when defined
{{ with .Site.Params.author.name }}{{.}}{{end}}
Add the author email when defined
{{ with .Site.Params.author.email }}{{.}}{{end}}
Add a hash of the author email when defined
{{ with .Site.Params.author.email }}{{sha256 .}}{{end}}
The entire file
The most up to date rss file is found at this github link