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

Camel-case taxonomy terms not working #11305

Closed
dominikbraun opened this issue Jul 30, 2023 · 3 comments
Closed

Camel-case taxonomy terms not working #11305

dominikbraun opened this issue Jul 30, 2023 · 3 comments

Comments

@dominikbraun
Copy link

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.115.1+extended darwin/arm64 BuildDate=unknown

Does this issue reproduce with the latest release?

Yes.


Description

A taxonomy with a camel-cased term, for example goTutorial, doesn't work in templates. I'm not sure whether this is intended as I couldn't find any rules about taxonomy names – but I find the behavior surprising.

Reproduce the issue

Add a taxonomy to the Hugo configuration.

[taxonomies]
series = 'series'

Use the taxonomy in a content file and assign a camel-cased term.

---
series:
- goTutorial
---

Use the term for iterating over all posts with that term:

<ul>
    {{ range .Site.Taxonomies.series.goTutorial }}
        <li><a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a></li>
    {{ end }}
</ul>

Nothing will be displayed. The template will only work when goTutorial is renamed to gotutorial or go_tutorial.

@jmooring
Copy link
Member

The identifier is lowercase unless disablePathToLower is true in your site configuration, but be aware of #9171.

Please use the forum (https://discourse.gohugo.io/) for questions and troubleshooting. We prefer to use GitHub for verified bugs and vetted enhancements. Thanks.

@dominikbraun
Copy link
Author

Thanks!

@github-actions
Copy link

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 Aug 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants