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
Prevent capitalized taxonomy labels #1880
Comments
No, I put this wrong. I apologize. With preserveTaxonomyNames set to true, all-upper case terms are preserved. But all-lower-case terms are titlecased. This is still not ideal. Better to control this in the template, not enforce it in the data passed into templates. |
That is not true. They are capitalized ("the one and only" becomes "The one and only" and not "The One And Only"), which is something different in my dictionary. |
With that said, I'm going to close this issue as a duplicate. This will get solved once @spf13 get out of his think tank and we can make the taxonomies first-class citizens of Hugo. |
Thank you, and you're right that it's sentence-cased, not title-cased. On Fri, Feb 19, 2016 at 12:33:29PM -0800, Bjørn Erik Pedersen wrote:
|
You are right. I thought about it when I introduced |
well, one option for the "Css" example is to use something like what golint does: a common initialisms lookup map so that CSS would be properly handled: https://github.com/golang/lint/blob/master/lint.go I'm not suggesting that that map should be used as is. Also this would probably end up adding knobs. |
Is there a new bug introduced in Version 0.19? https://discuss.gohugo.io/t/hugo-0-19-preservetaxonomynames-true-false/5640/1 |
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. |
According to https://gohugo.io/taxonomies/usage/, Hugo "titleizes" taxonomy labels automatically. This is often not desirable if the taxonomy label is an acronym or a proper name. For example, suppose I tag some of my posts about making stylish webpages with the tag "CSS." Then, in the listing for all posts with that tag at /tags/css, the header will read "Css," which is not correct. There is no way to adjust this within the /layouts/taxonomy/tag.html template, because the .Title variable has already been title-cased. This happens even if the preserveTaxonomyNames option is true. An option to turn off this behavior and provide taxonomy terms as-is in the .Title variable in this case would be very helpful. I'm sorry I don't know go well enough to provide a PR.
I think this similar but not quite the same as the issues referenced in #1641 and #1407.
The text was updated successfully, but these errors were encountered: