mirror of
https://github.com/getzola/zola
synced 2024-12-15 23:02:28 +00:00
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.
34 lines
1.1 KiB
Markdown
34 lines
1.1 KiB
Markdown
+++
|
|
title = "Sitemap"
|
|
weight = 60
|
|
+++
|
|
|
|
Zola will look for a `sitemap.xml` file in the `templates` directory or
|
|
use the built-in one.
|
|
|
|
If your site has more than 30 000 pages, it will automatically split
|
|
the links into multiple sitemaps, as recommended by [Google](https://support.google.com/webmasters/answer/183668?hl=en):
|
|
|
|
> All formats limit a single sitemap to 50MB (uncompressed) and 50,000 URLs.
|
|
> If you have a larger file or more URLs, you will have to break your list into multiple sitemaps.
|
|
> 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.
|
|
|
|
In such a case, Zola will use a template called `split_sitemap_index.xml` to render the index sitemap.
|
|
|
|
|
|
The `sitemap.xml` template gets a single variable:
|
|
|
|
- `entries`: all pages of the site, as a list of `SitemapEntry`
|
|
|
|
A `SitemapEntry` has the following fields:
|
|
|
|
```ts
|
|
permalink: String;
|
|
date: String?;
|
|
extra: Hashmap<String, Any>?;
|
|
```
|
|
|
|
The `split_sitemap_index.xml` also gets a single variable:
|
|
|
|
- `sitemaps`: a list of permalinks to the sitemaps
|