Skip to content

SEO: Emit <lastmod> in sitemap#2859

Open
ctauchen wants to merge 1 commit into
tigera:mainfrom
ctauchen:seo/sitemap-lastmod
Open

SEO: Emit <lastmod> in sitemap#2859
ctauchen wants to merge 1 commit into
tigera:mainfrom
ctauchen:seo/sitemap-lastmod

Conversation

@ctauchen

Copy link
Copy Markdown
Collaborator

Problem

The generated sitemap.xml contains no <lastmod> timestamps — every entry is just:

<url><loc>.../calico/latest/release-notes/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url>

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:

sitemap: {
  lastmod: 'date',
  ignorePatterns: ['/calico/[0-9]*.[0-9]*/**', '/calico-enterprise/[0-9]*.[0-9]*/**'],
},

Each URL now gets a <lastmod> date (derived from git history / file mtime). 'date' emits YYYY-MM-DD (day granularity, appropriate for docs).

Notes

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings July 17, 2026 12:01
@ctauchen
ctauchen requested a review from a team as a code owner July 17, 2026 12:01
@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 04e6cca
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6a5a198291c9d8000848afcd
😎 Deploy Preview https://deploy-preview-2859--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit 04e6cca
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6a5a1982866f9a0008bd49a8
😎 Deploy Preview https://deploy-preview-2859--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 93 (🔴 down 2 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 using lastmod: 'date' in the Docusaurus sitemap configuration.

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.

2 participants