From fa5be591f50a701f1a24a436f156b2ff42c9d1ba Mon Sep 17 00:00:00 2001 From: Jeroen van der Putten Date: Thu, 11 Feb 2016 09:21:23 +0100 Subject: [PATCH] Make the two common Taxonomy templates explicit https://gohugo.io/taxonomies/overview/ introduces the definitions 'Term' as a Key within that taxonomy. The filename Hugo accepts for Taxonomy terms can be confusing: SINGULAR.terms.html -> Renders at /SINGULAR/ SINGULAR.html -> Renders at /SINGULAR/TERM/ --- content/taxonomies/templates.md | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/content/taxonomies/templates.md b/content/taxonomies/templates.md index 0a44d5b19..fdb6cd530 100644 --- a/content/taxonomies/templates.md +++ b/content/taxonomies/templates.md @@ -13,14 +13,28 @@ title: Taxonomy Templates weight: 30 --- -There are two different templates that the use of taxonomies will require you to provide. +Taxonomy templates should be placed in the folder `layouts/taxonomy`. +When Taxonomy term template is provided for a Taxonomy, a section is rendered for it at `/SINGULAR/`. (eg. `/tag/` or `/category/`) -Both templates are covered in detail in the templates section. +There are two different templates that the use of taxonomies will require you to provide: -A [list template](/templates/list/) is any template that will be used to render multiple pieces of -content in a single html page. This template will be used to generate -all the automatically created taxonomy pages. +### All content attached to taxonomy -A [taxonomy terms template](/templates/terms/) is a template used to -generate the list of terms for a given template. +A [taxonomy terms template](/templates/terms/) is a template which has access to all the full Taxonomy structure. +This Template is commonly used to generate the list of terms for a given template. + +#### layouts/taxonomy/SINGULAR.terms.html + +For example: `tag.terms.html`, `category.terms.html`, or your custom Taxonomy: `actor.terms.html` + +### All content attached to term + +A [list template](/templates/list/) is used to automatically generate pages for each unique term found. + + +#### layouts/taxonomy/SINGULAR.html + +For example: `tag.html`, `category.html`, or your custom Taxonomy: `actor.html` + +Terms are rendered at `SINGULAR/TERM/`. (eg. `/tag/book/` or `/category/news/`)