Skip to content

Improve Website Indexing#9716

Merged
michaelstaib merged 2 commits into
mainfrom
mst/analytics-4
May 16, 2026
Merged

Improve Website Indexing#9716
michaelstaib merged 2 commits into
mainfrom
mst/analytics-4

Conversation

@michaelstaib
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 16, 2026 16:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 indexing for the documentation site by ensuring search engines treat the latest stable version of docs as canonical, while excluding older versions from indexing and the sitemap.

Changes:

  • Adds canonical, noindex, and og:url support to createMetadata, and sets metadataBase in the root layout.
  • Marks non-latest doc pages with noindex and points their canonical URL to the corresponding latest-version page; blog posts emit a self-canonical URL.
  • Builds the latest-version map dynamically in the sitemap (replacing the hardcoded DOCS_DISALLOWED regex) and extends robots.txt to disallow all older HotChocolate/Fusion/StrawberryShake versions.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
website/public/robots.txt Disallows all non-latest doc version paths from crawlers.
website/lib/metadata.ts Adds optional canonicalUrl, pageUrl, and noIndex fields and applies them to the generated Metadata.
website/app/layout.tsx Sets metadataBase so relative metadata URLs resolve to the site URL.
website/app/sitemap.ts Replaces hardcoded disallow regexes with dynamic per-product latestStableVersion filtering.
website/app/docs/[...slug]/page.tsx Computes canonicalUrl, pageUrl, and noIndex based on whether the doc page is on the latest version.
website/app/blog/[...slug]/page.tsx Sets self-canonical and og:url on individual blog posts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@michaelstaib michaelstaib merged commit 75e4494 into main May 16, 2026
18 checks passed
@michaelstaib michaelstaib deleted the mst/analytics-4 branch May 16, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants