How to list output formats for sections and taxonomy

I was using the following in my config.toml:

[outputs]
	home = [ "HTML", "RSS", "JSON" ]
	section = [ "HTML", "RSS"]

And showing the links with the following code:

{{ with .OutputFormats.Get "rss" }}
	<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}" title="{{ $.Site.Title }}">
{{ end }}

The problem here, is that I have a taxonomy called /stories/ that is also a section of the site. For some reason the above settings in config.toml don’t output anything for RSS when I visit /stories/StoryName/.

If I replace section = [ “HTML”, “RSS”] for taxonomy = [ “HTML”, “RSS”], it works. Yet, the expected behaviour was to see the rss feed for /stories/StoryName/.

I’ve solved my problem, but felt it wouldn’t hurt to share this here. Hope it helps someone else.

This is now fixed in Hugo master/upcoming 0.38. After that, you need to specify just the home Kind output formats as they are different from the default (includes JSON too). The others Kinds will stay at their default.

Long history :slight_smile:

1 Like

Missed that discussion. Good to know it’s already fixed though! :slight_smile: