This is a GoHugo theme component that implements various configurable feed formats. Currently implemented formats are RSS, Atom and JSONfeed.

Find out more about the RSS, Atom and JSON feed formats

Add this module
path = "github.com/davidsneighbour/hugo-feeds"
disable = false
ignoreConfig = false
ignoreImports = false
Latest Version (--)
Fix to this version
hugo mod get github.com/davidsneighbour/[email protected]


  • proper implementation of the formats
    • RSS
    • Atom
    • JSON feed
  • add hooks (for all feed formats or individual feed formats)
  • configurable section-, taxonomy- and term-feeds
  • partial to output list of available feeds on your website
  • proper testing, validation and dev-site


First enable modules in your own repository:

1hugo mod init github.com/username/reponame

Then add this module to your required modules in config.toml.

4path = " $MODULENAME$"

The next time you run hugo it will download the latest version of the module.


1# update this module
2hugo mod get -u $REPONAME$
3# update all modules
4hugo mod get -u #



hugo-feeds uses a cautious approach at configuring the output of the feeds. Where GoHugo’s internal RSS template prints all available pages without a configured limit, hugo-feeds will load only the 10 latest pages/posts, but you can configure at your pleasure.

If either rssLimit or services.rss.limit is defined and NOT overridden by any other configuration then these values will be choosen for RSS. Limits for specific feed formats can be configured explicitly.

 3limit = 10
 6limit = 10
 9limit = 10
12limit = 10

Limits are formatted via integers. 0 disables, everything at 1 and over selects the last x items and -1 will list all items.

TODO: configuration


Posts to show in feeds

Set dnb.feeds.items to posts to show only items that are listed in params.mainSections in your feeds. All other values will result in all pages being included.

Discreet Drafts

Have a read through @zbetz’s great article Discreet Drafts in Hugo and rest assured that without configuration this module will hide all drafts (posts with draft in their frontmatter set to true) from it’s feeds. If you wish to force drafts being shown in the feeds then set dnb.feeds.drafts to true.


hugo-feeds implements template hooks via hugo-hooks and makes the following hooks available:

Hook Description
feeds-init Hooks in after the opening tag. Do not open this to output anything. Just for initialising any of your plugins.
feeds-start Hooks in after the initial first tags that define your feeds purpose and before items of the feed are printed.
feeds-end Hooks in at the end of the feed after the items are printed.

All hooks exist in a second form containing the feed type and will run then only in that format. For example feeds-atom-init runs only at the init stage of the atom feed, feeds-rss-init in rss and feed-jsonfeed-init in JSONfeeds.