Fix terms template lookup order

This commit is contained in:
Ryan Watters 2017-03-31 19:33:59 -05:00
parent 4d27a27bb8
commit fb94d4c933

View File

@ -34,7 +34,7 @@ Taxonomy list page templates are lists and therefore have all the variables and
### Taxonomy List Template Lookup Order ### Taxonomy List Template Lookup Order
A Taxonomy will be rendered at /`PLURAL`/`TERM`/ (e.g., http://spf13.com/topics/golang/) from according to the following lookup order: A taxonomy will be rendered at /`PLURAL`/`TERM`/ (e.g., http://spf13.com/topics/golang/) according to the following lookup order:
1. `/layouts/taxonomy/<SINGULAR>.html` 1. `/layouts/taxonomy/<SINGULAR>.html`
2. `/layouts/_default/taxonomy.html` 2. `/layouts/_default/taxonomy.html`
@ -47,8 +47,15 @@ A Taxonomy will be rendered at /`PLURAL`/`TERM`/ (e.g., http://spf13.com/topics/
### Taxonomy Terms Templates Lookup Order ### Taxonomy Terms Templates Lookup Order
A taxonomy terms page will be rendered at `yoursite.com/<PLURALTAXONOMYNAME>`/ (e.g., http://spf13.com/topics/) according to the following lookup order:
1. `/layouts/taxonomy/<SINGULAR>.terms.html`
2. `/layouts/_default/terms.html`
3. `/themes/<THEME>/layouts/taxonomy/<SINGULAR>.terms.html`
4. `/themes/<THEME>/layouts/_default/terms.html`
{{% warning "The Taxonomy Terms Template has a Unique Lookup Order" %}} {{% warning "The Taxonomy Terms Template has a Unique Lookup Order" %}}
Compared to taxonomy list pages and other list templates such as [sections](/templates/section-templates/), a terms template lookup has only two options. If Hugo does not find a terms template in `layout/` or `/themes/<THEME>/layouts/`, Hugo will *not* render a taxonomy terms page. If Hugo does not find a terms template in `layout/` or `/themes/<THEME>/layouts/`, Hugo will *not* render a taxonomy terms page.
{{% /warning %}} {{% /warning %}}
<!-- Begin /taxonomies/methods/ --> <!-- Begin /taxonomies/methods/ -->