Skip to content

feat: add git-derived lastmod to sitemap and fix canonical URLs - #14

Merged
scriptautomate-bc merged 2 commits into
saltstack:mainfrom
scriptautomate-bc:feature/sitemap-lastmod
Sep 5, 2026
Merged

scriptautomate-bc merged 2 commits into
saltstack:mainfrom
scriptautomate-bc:feature/sitemap-lastmod

Conversation

@scriptautomate-bc

@scriptautomate-bc scriptautomate-bc commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Basic sitemap improvements across the docs to assist with AI agent or search engine crawlers for understanding when certain docs have last been updated.

Details

  • Bump sphinx-sitemap to 2.9.0 to pick up sitemap_show_lastmod, which
    sources from each page's git commit time via
    sphinx-last-updated-by-git. Move the en/latest/ path segment into
    html_baseurl and switch sitemap_url_scheme to {link} so rel=canonical
    tags resolve correctly instead of pointing at a 404.
  • The build job's checkout was depth-1, which causes
    sphinx-last-updated-by-git to either fail the build under -W or
    silently emit sitemap entries with no lastmod. Use fetch-depth: 0
    with a blobless filter to keep the clone cheap while preserving
    commit history.

Bump sphinx-sitemap to 2.9.0 to pick up sitemap_show_lastmod, which
sources <lastmod> from each page's git commit time via
sphinx-last-updated-by-git. Move the en/latest/ path segment into
html_baseurl and switch sitemap_url_scheme to {link} so rel=canonical
tags resolve correctly instead of pointing at a 404.
The build job's checkout was depth-1, which causes
sphinx-last-updated-by-git to either fail the build under -W or
silently emit sitemap entries with no lastmod. Use fetch-depth: 0
with a blobless filter to keep the clone cheap while preserving
commit history.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant