Open arranf opened 7 months ago
Why are you doing this?
[taxonomies]
example = []
This is a self-inflicted wound.
Why are you doing this?
[taxonomies] example = []
This is a self-inflicted wound.
Yep I address this (partially) in my initial description (relevant part copied below)!
Obviously an array in taxonomies is invalid configuration however I believe this is a regression. This was not an issue in 0.112.7. After upgrading to 0.121.2 I started observing this issue occasionally as a race condition, as of 0.123.8 onwards this bug is reproducible every time hugo executes.
The root cause if it's helpful to know, is that my configuration was mistakenly set like this.
[taxonomies]
# See: https://gohugo.io/content-management/taxonomies/#default-taxonomies
disableKinds = ['taxonomy', 'term']
Whilst you're correct to say the configuration is invalid, I thought it'd be helpful to receive a bug report about a regression and at the very least anyone else who made the same error I did might save the time of debugging this themselves!
The previous behavior wasn't great either. The right way to handle this is to make sure the plural (the right side) is a string, and error if not. But why do this for [taxonomies]
and not [someotherkey]
or someOtherValue
? I don't see us ever fully validating the site config.
I think this is unlikely to get fixed.
/layouts/index.html
I have used /layouts/_default/home.html
@agproclub That is not relevant to this issue.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes.
Issue Description
Hugo fails to resolve the correct template for the homepage under the following conditions:
/layouts/index.html
template (and no other template of a higher precedence)taxonomies
has at least one of the key value pair where the value is an array/content/_index.md
fileIn my main project, setting
disableKinds = ['taxonomy', 'term', 'section']
fixes the issue however I could not reproduce that in the reproduction repo (see: steps to reproduce).Obviously an array in
taxonomies
is invalid configuration however I believe this is a regression. This was not an issue in 0.112.7. After upgrading to 0.121.2 I started observing this issue occasionally as a race condition, as of 0.123.8 onwards this bug is reproducible every time hugo executes.Steps to Reproduce
See: https://github.com/arranf/hugo-homepage-template-reproduction
hugo --printUnusedTemplates --logLevel debug --cleanDestinationDir --ignoreCache
/layouts/index.html
is unused causing issues with the site buildPossibly Related Issues
12193
12146
12150