Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow partial redefinition of the ouputs config #4487

Closed
bep opened this issue Mar 10, 2018 · 2 comments · Fixed by #4489
Closed

Allow partial redefinition of the ouputs config #4487

bep opened this issue Mar 10, 2018 · 2 comments · Fixed by #4489
Assignees
Labels
Milestone

Comments

@bep
Copy link
Member

bep commented Mar 10, 2018

In Hugo, the default outputs configuration looks like this:

[outputs]
  page = ["HTML"] 
  home = ["HTML", "RSS"] 
  section = ["HTML", "RSS"] 
  taxonomy = ["HTML", "RSS"] 
  taxonomyTerm = ["HTML", "RSS"] 

This is what you get when doing nothing.

The current behaviour says that if you provide your own outputs configuration, it must be complete.

We do, however, add HTML as a fallback for a missing config entry. But, currently, if you want to add JSON to the home page (for a search index), this:

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

Will result in missing RSS for the other list types.

This is surprising for users. See gohugoio/hugoDocs#408

  • outputFormats, mediaTypes, related, outputs, permalinks(and maybe others) translates into a map in the config.
  • For maps with entries of the same type (mediaTypes), Hugo allows redefinition of just one or more entries.
  • For maps with entries of different types (related), you must provide the full configuration. The different entries only make sense in relation to the others.

We will follow the rule in the above and change the way outputs behaves.

@kaushalmodi
Copy link
Contributor

I confirm the fix in this commit. Thanks!

@github-actions
Copy link

github-actions bot commented Mar 6, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants