You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

taxonomies.md 1.1KB

12345678910111213141516171819202122232425262728293031323334353637
  1. +++
  2. title = "Taxonomies"
  3. weight = 90
  4. +++
  5. Zola has built-in support for taxonomies.
  6. The first step is to define the taxonomies in your [config.toml](./documentation/getting-started/configuration.md).
  7. A taxonomy has 5 variables:
  8. - `name`: a required string that will be used in the URLs, usually the plural version (i.e. tags, categories etc)
  9. - `paginate_by`: if this is set to a number, each term page will be paginated by this much.
  10. - `paginate_path`: if set, will be the path used by paginated page and the page number will be appended after it.
  11. For example the default would be page/1
  12. - `rss`: if set to `true`, a RSS feed will be generated for each individual term.
  13. - `lang`: only set this if you are making a multilingual site and want to indicate which language this taxonomy is for
  14. Once this is done, you can then set taxonomies in your content and Zola will pick
  15. them up:
  16. ```toml
  17. +++
  18. ...
  19. [taxonomies]
  20. tags = ["rust", "web"]
  21. categories = ["programming"]
  22. +++
  23. ```
  24. The taxonomy pages will only be created if at least one non-draft page is found and
  25. are available at the following paths:
  26. ```plain
  27. $BASE_URL/$NAME/
  28. $BASE_URL/$NAME/$SLUG
  29. ```