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.0KB

123456789101112131415161718192021222324252627282930313233343536
  1. +++
  2. title = "Taxonomies"
  3. weight = 90
  4. +++
  5. Gutenberg 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 4 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. Once this is done, you can then set taxonomies in your content and Gutenberg will pick
  14. them up:
  15. ```toml
  16. +++
  17. ...
  18. [taxonomies]
  19. tags = ["rust", "web"]
  20. categories = ["programming"]
  21. +++
  22. ```
  23. The taxonomy pages will only be created if at least one non-draft page is found and
  24. are available at the following paths:
  25. ```plain
  26. $BASE_URL/$NAME/
  27. $BASE_URL/$NAME/$SLUG
  28. ```