How to customise a taxonomy url? Title is MBCS

Hello,

I’ve read “Content for home page and other list pages” doc but I couldn’t understand well. Could anyone help me,please?

My website is written in Japanese, so I’d like to show taxonomies(categories, tags) in Japanese but would like to set URLs in English because using punycodes looks very very ugly!

What I want to do is;
Taxonomy on the site : 映画 <- this means film/movie
URL :film

I think I put _index.mod on /content/categories/film , but do not know what should I write in this _index.md.
I tried following, but doesn’t work.

+++
title = "映画"
isCJKLanguage = true
url = “/film”
+++

I know, my understanding is so much poor that I wouldn’t understand very basic things. I really appreciate if anyone helped me.

Thank you.

What is important to understand here, and I’ll admit that this may be hard in some cases, is that if you have:

  • A category named “Hugo Rocks”
  • Then, by default, this will end up in /categories/hugo-rocks
  • So, to add metadata (title, content, url) to this category, you would have to put the _index.md file in /categories/hugo-rocks/

I’m not 100% how your example would look like on the disk, but putting it in /content/categories/film is obviously wrong.

Have a look at the disk (in /public) when you generate the site, but I would guess that the correct placement is //content/categories/映画

Thank you very much for your reply.

Okay, I’ve got that I’d perfectly misunderstood. So when I want to get URL of //content/categories/film , and show it as 映画 on the website, what should I do?

When you click taxonomy’s link, which is 映画 this time, the URL I want is //content/categories/film . I don’t want to see this film’s category URL as //content/categories/映画.

Thank you.

Put a file named _index.md in the folder /content/categories/映画 with the front matter, url etc. that you want.