Skip to content

Commit

Permalink
Document PreserveTaxonomyNames
Browse files Browse the repository at this point in the history
  • Loading branch information
moorereason authored and anthonyfok committed Dec 11, 2015
1 parent 4a2623c commit 280b2f2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/content/overview/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ Following is a list of Hugo-defined variables that you can configure and their c
paginatePath: "page"
permalinks:
# Pluralize titles in lists using inflect
pluralizeListTitles: true
pluralizeListTitles: true
# Preserve special characters in taxonomy names ("Gérard Depardieu" vs "Gerard Depardieu")
preserveTaxonomyNames: false
publishdir: "public"
# color-codes for highlighting derived from this style
pygmentsStyle: "monokai"
Expand Down
14 changes: 13 additions & 1 deletion docs/content/taxonomies/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,19 @@ Assigning content to an taxonomy is done in the front matter.
Simply create a variable with the *plural* name of the taxonomy
and assign all terms you want to apply to this content.

**taxonomy values are case insensitive**
## Preserving taxonomy values

By default, taxonomy names are hyphenated, lower-cased and normalized, and then
fixed and titleized on the archive page.

However, if you want to have a taxonomy value with special characters
such as `Gérard Depardieu` instead of `Gerard Depardieu`,
you need to set the `preserveTaxonomyNames` [site configuration](/overview/configuration/) variable to `true`.
Hugo will then preserve special characters in taxonomy values
but will still titleize the values for titles and normalize them in URLs.

Note that if you use `preserveTaxonomyNames` and intend to manually construct URLs to the archive pages,
you will need to pass the taxonomy values through the `urlize` template function.

### Front Matter Example (in TOML)

Expand Down

0 comments on commit 280b2f2

Please sign in to comment.