{#- The site's sitemap, in place of the MkDocs default. The default stamps every URL with the build date, which tells a crawler the whole site changed every time anything did -- the same as telling it nothing. Here each URL carries the date its page was last edited, taken from git by hooks/seo.py, and falls back to the build date only when there is no history to read (a shallow checkout). Priority is a hint most crawlers ignore, so it says one true thing rather than a graded guess: the home page is the entry point, every documentation page matters equally after that. A page can override it with `sitemap_priority` in its front matter. A page marked `noindex: true` is left out: overrides/main.html already tells crawlers not to index it, and a sitemap that lists it anyway contradicts that. -#} {%- for file in pages %} {%- if file.page and not file.page.is_link and not file.page.meta.noindex %} {{ file.page.canonical_url }} {{ file.page.meta.git_date | default(build_date_utc.strftime('%Y-%m-%d'), true) }} {{ 'weekly' if file.page.is_homepage else 'monthly' }} {{ file.page.meta.sitemap_priority | default('1.0' if file.page.is_homepage else '0.8', true) }} {%- endif %} {%- endfor %}