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
taxonomy.html and terms.html reversed #10048
Comments
We have a million tests for this, so I'm pretty sure this works as designed. I don't know your setup, though, so I cannot tell what's happening. I suggest you raise a new thread on the forum. |
@bep Okay, will do and thanks for taking a look. For what it's worth, I was able to reproduce this with a fresh Hugo project as well.
In the output:
Am I missing something here about the terminology? I was under the impression that "test_taxonomy" here is the Taxonomy, and "taxonomy1" is the term, and the layout selection seems to be obviously reversed. I uploaded my test project here if you'd like to take a look: https://drive.google.com/file/d/19xizGJJ69an7iA7fkLsEZ10ufm4KKaCJ/view?usp=sharing Edit: for clarity I should have named "taxonomy1" "term1" or something, but it shouldn't matter either way. |
@bep I cleaned up my example and put it into a Github repo for easy access here: https://github.com/gumaerc/hugo-taxonomy-template-bug |
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. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes, I'm using the latest release
This discourse thread describes the exact issue I'm experiencing here with the latest version of Hugo today. I have layouts defined in my Hugo theme at
layouts/learning_resource_types/taxonomy.html
as well aslayouts/learning_resource_types/terms.html
and thetaxonomy
kind seems to be selectingterms.html
whereterm
kinds are selecting thetaxonomy.html
template. I added debug lines to my template to prove this, with<div>{{ printf "%#v" .Kind }}</div>
in mybaseof.html
to print thekind
of the current page, and a literal<div>taxonomy.html</div>
in mytaxonomy.html
template as well as a<div>terms.html</div>
in myterms.html
template. It results in the following:As you can see, when the
kind
of the page istaxonomy
,terms.html
is being selected whereas if thekind
isterm
,taxonomy.html
is being selected.Side note: we are using the
permalinks
directive to redirect ourlearning_resource_types
taxonomy pages to/resources
which is why you see the URLs for this at/resources
.The text was updated successfully, but these errors were encountered: