Taxonomy url with CJK

It seems like that hugo will generate Taxonomy slug used in url for Taxonomies defined in the content.

For example for the following content:

---
title:xxx
tags:["Java Collection"]
---

Then I can access the tag link by /tags/java-collection where the java-collection is generated by hugo.

But when the tags name contains cjk like this:

---
title:xxx
tags:["目録"]
---

I can access the tag page by tags/目録/. However I prefer to avoid cjk charterer in the URL, any solution?

Set the permalink in the front matter of the taxonomy term.

Then one have to change the permalink for all the documents once the slug changed. I’d prefer to set the permalink in the config file for the site. Since the slug will be the same for all the documents.

Sorry, I always forget about this. Ahem: no. :slight_smile:

You can’t change the permalink for terms. I suggest using the slug-name of the term you want to use in the URL, and add the translated name to the term’s front matter, so it shows in term lists and and that page as the appropriate name.

Or don’t worry about it. I think it’s fine using those in URLs. Humans won’t mind. :sunglasses:

Any live example? I am not exactly sure your meaning. :frowning:

You don’t want tags/目録/. What do you want that to be instead? If you wanted it to be tags/example/, when you add the tag to the content, you would write:

---
title:xxx
tags:["example"]
---

And in content/tags/example/_index.md:

---
title: 目録
---

That would give the tag (rendered at example.com/tags/example) the correct title. That is the only option I know of, currently.

@kgmaven See https://io-oi.me/tech/hugo-vs-hexo/#url

---
title:xxx
tags:["example"]
---

While in the /tags page where all the tags will be listed, the tag will show example instead of 目録.