Taxonomy names case

I need a list of categories on my index page.
Documentation suggests something like this:

{{ range $key, $taxonomy := .Site.Taxonomies.categories }}
  <a href="/categories/{{ $key | urlize }}/">{{ $key }}</a>
{{end}}

My issue with this code is that all items end up being in lower case (i.e. hugo, js), whereas {{ range .Params.categories }} for page returns categories in original case, just like they written in the front matter (i.e. Hugo, JS).

Is this bug or feature? Is there a better way to get an original name and URL for each taxonomy item?

It’s as designed …

In the upcoming Hugo 0.15 there is a config option PreserveTaxonomyNames that does what you want. We will revisit this one and make a better and more general solution when we add content, front matter etc. to the nodes.