Skip to content

Commit

Permalink
Explain use of disableKinds to remove default taxonomy
Browse files Browse the repository at this point in the history
  • Loading branch information
rdwatters authored and anthonyfok committed Jul 13, 2017
1 parent 10065c6 commit 7e9ad42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ twitter = "GoHugoIO"
## As of v0.20, all content files include a default "categories" value that's the same as the section. This was a cheap future-proofing method and should/could be changed accordingly.
[taxonomies]
tag = "tags"

category = "categories"

# High level items

Expand Down
10 changes: 5 additions & 5 deletions content/content-management/taxonomies.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ Moonrise Kingdom <- Content

## Hugo Taxonomy Defaults

Hugo natively supports taxonomies, which means there are architectural patterns for rendering your project's taxonomies baked into Hugo's core.
Hugo natively supports taxonomies, which means there are architectural patterns for rendering your project's taxonomies baked into Hugo's core.

{{% note %}}
Users of versions older than v0.20 may notice that Hugo built `/tags` and `/categories` as long as these fields were called in at least a single content file. A previous hack involved setting these values to empty strings. This is *not* a proper workaround.
Without adding a single line to your site's configuration file, Hugo will automatically create taxonomies for `tags` and `categories`. If you do not want Hugo to create these taxonomies---even though the values may be added to your content files' front matter---set `disableKinds` in your site's configuration to the following:

As of v0.20, Hugo does *not* automatically generate default taxonomies for your site. If your site configuration contains no key-values in the taxonomies field, Hugo will not build anything.
{{% /note %}}
```toml
disableKinds = ["taxonomy","taxonomyTerm"]
```

### Default Destinations

Expand Down

0 comments on commit 7e9ad42

Please sign in to comment.