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.

sitemap.md 1.1KB

123456789101112131415161718192021222324252627282930313233
  1. +++
  2. title = "Sitemap"
  3. weight = 60
  4. +++
  5. Zola will look for a `sitemap.xml` file in the `templates` directory or
  6. use the built-in one.
  7. If your site has more than 30 000 pages, it will automatically split
  8. the links into multiple sitemaps as recommended by [Google](https://support.google.com/webmasters/answer/183668?hl=en):
  9. > All formats limit a single sitemap to 50MB (uncompressed) and 50,000 URLs.
  10. > If you have a larger file or more URLs, you will have to break your list into multiple sitemaps.
  11. > You can optionally create a sitemap index file (a file that points to a list of sitemaps) and submit that single index file to Google.
  12. In such a case, Zola will use a template called `split_sitemap_index.xml` to render the index sitemap.
  13. The `sitemap.xml` template gets a single variable:
  14. - `entries`: all pages of the site, as a list of `SitemapEntry`
  15. A `SitemapEntry` has the following fields:
  16. ```ts
  17. permalink: String;
  18. date: String?;
  19. extra: Hashmap<String, Any>?;
  20. ```
  21. The `split_sitemap_index.xml` also gets a single variable:
  22. - `sitemaps`: a list of permalinks to the sitemaps