Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove accents from generated taxonomy pages url #664

Closed
postb99 opened this issue Oct 1, 2023 · 2 comments
Closed

Remove accents from generated taxonomy pages url #664

postb99 opened this issue Oct 1, 2023 · 2 comments
Labels
support Request for achieving a specific goal

Comments

@postb99
Copy link

postb99 commented Oct 1, 2023

Hello,

On my live site, I found out that urls with accents don't work.

Look at https://poesieland.free.fr/categories/ then follow the first link of the page.

Locally it work fine.

Is this a server issue? Maybe the taxonomy pages could use normalized version of category/tag name when being generated?

@McShelby
Copy link
Owner

McShelby commented Oct 1, 2023

This seems to be a server issue as I could not reproduce it neither with your used version of the theme nor the current head in main.

As far as I know file name normalization is not done by Hugo and is not configurable.

You could probably add a custom term page and adding slug to it - but that's just a wild guess. Also, this would be a hassle as you have to add such a page for every term that contains accents.

The best way seems to be, changing the server configuration.

See also: https://discourse.gohugo.io/t/diacritics-accented-charactes-in-taxonomy-names-and-terms/30542

@postb99 postb99 changed the title Question about accents in generated taxonomy pages Remove accents from generated taxonomy pages url Oct 2, 2023
@postb99
Copy link
Author

postb99 commented Oct 2, 2023

Since I don't have control over server configuration, and anyways didn't find what could be relevant, I took a second look at Hugo's feature and the aforementioned configuration option works, is still supported and handles "é" and "è", so here is the magic option: https://gohugo.io/getting-started/configuration/#removepathaccents

Hovewer this may not work for all characters: https://discourse.gohugo.io/t/remove-competely-accents-from-url/35416

@postb99 postb99 closed this as completed Oct 2, 2023
@McShelby McShelby added the invalid This doesn't seem right label Oct 3, 2023
@McShelby McShelby added support Request for achieving a specific goal and removed invalid This doesn't seem right labels Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Request for achieving a specific goal
Projects
None yet
Development

No branches or pull requests

2 participants