SEO: Emit <lastmod> in sitemap#2859
Open
ctauchen wants to merge 1 commit into
Open
Conversation
The generated sitemap.xml had no <lastmod> timestamps (only changefreq and priority), so search engines had no signal that a page's content changed. This hurts pages whose body is fully replaced each release under a stable URL — most notably /calico/latest/release-notes/ — leaving stale snapshots in the index. Enable the sitemap plugin's `lastmod: 'date'` option (supported since Docusaurus 3.4; project is on 3.10) so each URL gets a <lastmod> date derived from git. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for calico-docs-preview-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview succeeded!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves SEO for the Docusaurus-generated sitemap.xml by enabling <lastmod> output so search engines can better detect when stable URLs (notably release notes pages) change between releases.
Changes:
- Enable sitemap
<lastmod>emission usinglastmod: 'date'in the Docusaurus sitemap configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
The generated
sitemap.xmlcontains no<lastmod>timestamps — every entry is just:Without
<lastmod>, search engines have no signal that a page changed, so they recrawl lazily. This hits pages whose body is fully replaced each release under a stable URL hardest — above all/calico/latest/release-notes/, whose content swaps every minor release. In the field, Google's indexed copy of that page was stale by several releases (showing 3.28-era content while live was 3.32).Change
Enable the sitemap plugin's
lastmod: 'date'option:Each URL now gets a
<lastmod>date (derived from git history / file mtime).'date'emitsYYYY-MM-DD(day granularity, appropriate for docs).Notes
^3.10.1.🤖 Generated with Claude Code