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

Fix taxonomy titles #1184

Closed
wants to merge 2 commits into from
Closed

Fix taxonomy titles #1184

wants to merge 2 commits into from

Conversation

bep
Copy link
Member

@bep bep commented May 30, 2015

See commit messages for details.

This is an issue that has been nagging me for a while.

I'm not totally happy about this fix. I would ideally just have added the full taxonomy name to the taxonomy entry, but I get dizzy thinking about just the documentation changes needed.

If someone knows about a "rangeable struct" that can take additional fields I would be happy to throw out some of this code.

/cc @spf13 @tatsushid @nicolinuxfr

Fixes #1180

bep added 2 commits May 30, 2015 14:46
So the taxonomy `Gérard Depardieu` gives paths on the form `gerard-depardieu`.

Unfortunately this introduces two imports from the `golang.org/`, but Unicode-normalization isn't something we'd want to write from scratch.

See https://blog.golang.org/normalization

See gohugoio#1180
Before this commit, taxonomy names were hyphenated, lower-cased and normalized -- then fixed and titleized on the archive page.

So what you entered in the front matter isn't necessarily what you got in the final site.

To preserve backwards compability, `PreserveTaxonomyNames` is default `false`.

Setting it to `true` will preserve what you type (the first characters is made toupper for titles), but normalized in URLs.

This also means that, if you manually construct URLs to the archive pages, you will have to pass the Taxonomy names through the `urlize` func.

Fixes gohugoio#1180
@nicolinuxfr
Copy link

I can't try it right now but if I understand the commit message, it's exactly what I needed. "Gérard Depardieu" in the post metadata so, gerard-depardieu as slug and "Gérard Depardieu" as archive title.

Right ? If so, I don't understand why you would not be happy. :-)

@bep
Copy link
Member Author

bep commented May 30, 2015

Yea, it's exactly what you want ... but the implementation could be cleaner if I didn't have to worry about breaking some sites.

@bep
Copy link
Member Author

bep commented May 31, 2015

Merged in be38acd

@bep bep closed this May 31, 2015
@bep bep deleted the taxaccents-take2 branch April 18, 2017 09:19
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Special characters in taxonomy and slugs
2 participants