V0.54+ BUG: GetPage is broken with non-ASCII chars - invalid taxonomy URL generated

See https://github.com/gohugoio/hugo/issues/5687

Prior to Hugo 0.54 this was working fine without any issues, so it appears to be a bug from 0.54 onwards.

To reproduce the apparent bug, add tags = ["Özgür"] to some content.

Then add the official taxonomy template code to a page template:

{{ $taxo := "tags" }} <!-- Use the plural form here -->
<ul id="{{ $taxo }}">
    {{ range .Param $taxo }}
        {{ $name := . }}
        {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }}
            <li><a href="{{ .Permalink }}">{{ $name }}</a></li>
        {{ end }}
    {{ end }}

Hugo 0.54+ fails to generate the correct permalink for non-ASCII taxonomy terms in the above code.

Sorry, I’m sure someone will get to your question. I have one of my own: where did you get that code snippet? From a test theme? I am not aware of official templates.

Thanks, the code snippet is from the official page on taxonomy templates in the docs: https://gohugo.io/templates/taxonomy-templates/

Hello there!
I posted an answer to the GitHub thread.

It might be enough just to add removePathAccents = true to the config file.

Hope this helps!
There’s a bit more info in the following link.

There are a few partial workarounds such as this one, but the Hugo bug remains unfixed.