Skip to content

Special characters in taxonomy and slugs #1180

@nicolinuxfr

Description

@nicolinuxfr

I'm trying Hugo for my personal blog which has a lot of taxonomies. And as I'm writing in French, many taxonomies have special characters in them, like an accentuated letter.

Right now, I'm using WordPress which has the perfect behavior on this matter. The taxonomy name can have any special characters (for example, "Gérard Depardieu"), the slug associated with it only has standard characters (gerard-depardieu). But when you display the taxonomy archive, you still have the special characters : so in this case, you would not have "Gerard Depardieu", but "Gérard Depardieu"). You can see the example live here : http://voiretmanger.fr/acteur/gerard-depardieu/.

taxonomy-example

I don't know if Hugo could do the same. I know WordPress has a database, so it's easier. But I can see some solutions (or hacks) to make it work : either look in the metadata associated with the post to display the name of the taxonomy on the archive page, or have a "table" (a YAML/TOML config file, I guess) with all correspondances.

An idea, to end my Gérard Depardieu example :

gerard-depardieu: "Gérard Depardieu"

I hope a solution will be feasible, because it's the main thing that would be keeping me out of Hugo and with WordPress. I think I can find a solution for every other problems I have…

Thanks anyway for your time !

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions