mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-01 19:22:38 +00:00
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/
This commit is contained in:
committed by
digitalcraftsman
parent
4a81c507ea
commit
fa5be591f5
@@ -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/`)
|
||||
|
||||
Reference in New Issue
Block a user