diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-06-16 15:43:50 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-06-18 09:09:56 +0200 |
commit | fc045e12a953aac88b942c25b958c5c0554b252b (patch) | |
tree | ad8e171d0730f55eb9a531c1a9f0a8dfb51065ad /docs/content/en/content-management/taxonomies.md | |
parent | 9679023f2b0d7c55b70f23fd94603f301a841079 (diff) |
Rename taxonomy kinds from taxonomy to term, taxonomyTerm to taxonomy
And we have taken great measures to limit potential site breakage:
* For `disableKinds` and `outputs` we try to map from old to new values if possible, if not we print an ERROR that can be toggled off if not relevant.
* The layout lookup is mostly compatible with more options for the new `term` kind.
That leaves:
* Where queries in site.Pages using taxonomy/taxonomyTerm Kind values as filter.
* Other places where these kind value are used in the templates (classes etc.)
Fixes #6911
Fixes #7395
Diffstat (limited to 'docs/content/en/content-management/taxonomies.md')
-rw-r--r-- | docs/content/en/content-management/taxonomies.md | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/content/en/content-management/taxonomies.md b/docs/content/en/content-management/taxonomies.md index 03747e72b..869193cb3 100644 --- a/docs/content/en/content-management/taxonomies.md +++ b/docs/content/en/content-management/taxonomies.md @@ -1,10 +1,9 @@ --- title: Taxonomies linktitle: -description: Hugo includes support for user-defined taxonomies to help you demonstrate logical relationships between content for the end users of your website. +description: Hugo includes support for user-defined taxonomies.. date: 2017-02-01 publishdate: 2017-02-01 -lastmod: 2017-02-01 keywords: [taxonomies,metadata,front matter,terms] categories: [content management] menu: @@ -32,7 +31,6 @@ Term Value : a piece of content assigned to a term -{{< youtube pCPCQgqC8RA >}} ## Example Taxonomy: Movie Website @@ -97,9 +95,13 @@ Without adding a single line to your [site config][config] file, Hugo will autom If you do not want Hugo to create any taxonomies, set `disableKinds` in your [site config][config] to the following: {{< code-toggle copy="false" >}} -disableKinds = ["taxonomy","taxonomyTerm"] +disableKinds = ["taxonomy","term"] {{</ code-toggle >}} +{{< new-in "0.73.0" >}} We have fixed the before confusing page kinds used for taxonomies (see the listing below) to be in line with the terms used when we talk about taxonomies. We have been careful to avoid site breakage, and you should get an ERROR in the console if you need to adjust your `disableKinds` section. + +{{< page-kinds >}} + ### Default Destinations When taxonomies are used---and [taxonomy templates][] are provided---Hugo will automatically create both a page listing all the taxonomy's terms and individual pages with lists of content associated with each term. For example, a `categories` taxonomy declared in your configuration and used in your content front matter will create the following pages: @@ -190,7 +192,7 @@ By using taxonomic weight, the same piece of content can appear in different pos Currently taxonomies only support the [default `weight => date` ordering of list content](/templates/lists/#default-weight-date). For more information, see the documentation on [taxonomy templates](/templates/taxonomy-templates/). {{% /note %}} -## Add custom metadata to a Taxonomy Term +## Add custom metadata a Taxonomy or Term If you need to add custom metadata to your taxonomy terms, you will need to create a page for that term at `/content/<TAXONOMY>/<TERM>/_index.md` and add your metadata in it's front matter. Continuing with our 'Actors' example, let's say you want to add a wikipedia page link to each actor. Your terms pages would be something like this: @@ -201,7 +203,6 @@ If you need to add custom metadata to your taxonomy terms, you will need to crea --- {{< /code >}} -You can later use your custom metadata as shown in the [Taxonomy Terms Templates documentation](/templates/taxonomy-templates/#displaying-custom-metadata-in-taxonomy-terms-templates). [`urlize` template function]: /functions/urlize/ [content section]: /content-management/sections/ |