Taxonomy Aliases

I’m migating My site from Wordpress to Hugo, my Wordpress categories structure is look like:

  • Name: Lập trình
  • Slug: lap-trinh
    But when use Hugo, it will generate lập-trình
    I’ve some workaround solution but not happy with it:
  1. Use S3 routing rules (the drawback is it only support 50 rules)
  2. Create duplicated categories, my front matter should look like:
    `categories=[“lap trinh”, “lập trình”]``
    (The drawback is it looks duplicated)
    Does anyone have a solution to set the slug or generate redirect files using aliases?
    Thank you for reading,

@joehua87 If I’m understanding your question correctly, have you tried preserveTaxonomyNames: false in your config file?

Check out the explanation of all the config parameters here:

http://gohugo.io/overview/configuration/

That will not help in this case.

You may try to create aliases for the “trouble cases”, i.e. put alias definition inside

/content/categories/lập-trình/_index.md

Etc.

1 Like

Ahhh, now I see. I hadn’t even thought of aliases: [] in front matter of section/list pages. That’s a nice added feature from v.18+.

1 Like

@bep @rdwatters thank you :blush: