Taxonomy
Definition
Taxonomy -> Term -> Page
Example:
category -> Go -> Page
Add in the front matter of some pages anywhere in the site:
title: 'Page 1'
categories: ['Go']
…
title: 'Page 2'
categories: ['Python']
Hugo will produce:
-
A taxonomy page at
/categories/index.html
that lists ‘Go’ and ‘Python’ -
A term page at
/categories/go/index.html
that lists Page1 -
A term page at
/categories/python/index.html
that lists Page2
Lookup order
Taxonomy list
Use terms.html
[1]
:
_default/terms.html
_default/taxonomy.html
_default/list.html
Taxonomy term
Use: term.html
[2]
_default/term.html
_default/taxonomy.html
_default/list.html
Customization
[permalinks]
categories = "/folder/category/:slug/"