51d4b6bd6a
* Update installation.md * Update cli-usage.md * Update installation.md * Update directory-structure.md * Update configuration.md * Update overview.md * Update section.md * Update page.md * Update section.md * Update configuration.md * Update page.md * Update section.md * Update page.md * Update shortcodes.md * Update linking.md * Update table-of-contents.md * Update syntax-highlighting.md * Update taxonomies.md * Update search.md * Update sass.md * Update index.md * Update multilingual.md * Update overview.md * Update pages-sections.md * Update pagination.md * Update taxonomies.md * Update rss.md * Update sitemap.md * Update robots.md * Update 404.md * Update archive.md * Update overview.md * Update installing-and-using-themes.md * Update creating-a-theme.md * Update netlify.md * Update github-pages.md * Update gitlab-pages.md * Update index.md * Update page.md * Update section.md * Updates.
1.4 KiB
1.4 KiB
+++ title = "Taxonomies" weight = 40 +++
Zola will look up the following files in the templates
directory:
$TAXONOMY_NAME/single.html
$TAXONOMY_NAME/list.html
First, TaxonomyTerm
has the following fields:
name: String;
slug: String;
permalink: String;
pages: Array<Page>;
and TaxonomyConfig
has the following fields:
name: String,
slug: String,
paginate_by: Number?;
paginate_path: String?;
rss: Bool;
Taxonomy list (list.html
)
This template is never paginated and therefore gets the following variables in all cases.
// The site config
config: Config;
// The data of the taxonomy, from the config
taxonomy: TaxonomyConfig;
// The current full permalink for that page
current_url: String;
// The current path for that page
current_path: String;
// All terms for that taxonomy
terms: Array<TaxonomyTerm>;
// The lang of the current page
lang: String;
Single term (single.html
)
// The site config
config: Config;
// The data of the taxonomy, from the config
taxonomy: TaxonomyConfig;
// The current full permalink for that page
current_url: String;
// The current path for that page
current_path: String;
// The current term being rendered
term: TaxonomyTerm;
// The lang of the current page
lang: String;
A paginated taxonomy term will also get a paginator
variable; see the [pagination page]
(@/documentation/templates/pagination.md) for more details.