zola/docs/content/documentation/templates/tags-categories.md
Vincent Prouillet bdcad38310 Finishing up site (#131)
* Finishing up site

* Make site a bit responsive

* Fix menu responsiveness

* Remove Fira Sans and revamp a bit text

* Update list of syntax and change output of syntax

* Add Rust mention

* Some doc tweaks

* Correct capitalization for GitHub

Correct capitalization for GitHub

* Some CSS tweaks

* More css tweaks + favicon

* Add link to my site
2017-10-19 13:48:50 +02:00

30 lines
911 B
Markdown

+++
title = "Tags & Categories"
weight = 40
+++
Tags and categories actually get the same data but with different variable names.
The default templates for those pages are the following:
- `tags.html`: list of tags, gets variable `tags`
- `tag.html`: individual tag, gets variable `tag`
- `categories.html`: list of categories, gets variable `categories`
- `category.html`: individual category, gets variable `category`
You can override any of those templates by putting one with the same name in the `templates` directory.
`tags` and `categories` both are an array of `TaxonomyItem` sorted alphabetically, while `tag` and `category`
are a `TaxonomyItem`.
A `TaxonomyItem` has the following fields:
```ts
name: String;
slug: String;
permalink: String;
pages: Array<Page>;
```
Currently, there is no way to define different taxonomy templates per section, change
the path used for them or paginate them.