Preserve uppercase when use .Site.Taxonomies.tags

I have a post’s tags define as below:

tags: ["User-Case"]

When I use .Site.Taxonomies.tags to achieve my tags links, I find that the value define in tags changed to lowercase such as ‘user-case’, I don’t want that and how to prohibit this. Thanks.

Hi there,

Try this example in the docs using .Page.Title: https://gohugo.io/templates/taxonomy-templates/#example-list-all-site-tags

2 Likes

You can now use .Page.Title on the relevant taxonomy node to get the original value.

PS: Sample:

{{range .Data.Terms.Alphabetical -}} 
	<a href={{ .Page.RelPermalink }} >{{.Page.Title}}</a>&nbsp;<sup class=b>{{.Count}}</sup>
{{- end}}

here with the count :wink:

2 Likes

Really thanks for that, I got that I misunderstood the use of .Page.Title.