Skip to content

fix(seo): exclude documentation artifacts from the sitemap - #1470

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/sitemap-doc-artifacts
Nov 1, 2026
Merged

tannerlinsley merged 1 commit into
mainfrom
taren/sitemap-doc-artifacts

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

The live sitemap includes documentation drafts and repository README files. Filter drafts directories, .draft paths and README segments before generating documentation entries, preserving the existing exclusions and public guide paths.

The path filter is separated from the server-backed sitemap module so its behavior can be tested without loading image assets and server imports. A fresh production sitemap contained ten matching artifacts. The regression failed against the previous filter and passes with the fix, including nested paths and retained public guides.

This addresses the repository-artifact portion of #1153. That issue remains open for redirect resolution, unhealthy generated reference pages, showcase coverage and the full deployed-page contract. The independent Charts canonical URL fix is #1469 and source-failure handling is #1267.

Validation: focused regression tests pass. Normal commit hooks passed formatting, TypeScript, lint, 687 unit tests, 2,278 chat tests and 20 desktop tests, with 5, 6 and 1 skipped respectively. Offline evaluation against the captured production sitemap removes the ten reported artifacts; this is not a deployed result.

Summary by CodeRabbit

  • Bug Fixes
    • Sitemap listings now exclude draft documents, README pages, examples and community sections, and selected repository or contributor pages.
    • Public guide pages remain eligible for inclusion, while empty or otherwise excluded entries stay out of the sitemap.

@changeset-bot

changeset-bot Bot commented Nov 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: adab863

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd4056a3-c2de-418c-b56d-613d1e143427
Commits

Reviewing files that changed from the base of the PR and between d72c534 and adab863.

Files selected for processing: 3
  • src/utils/sitemap-docs.ts
  • src/utils/sitemap.ts
  • tests/sitemap-docs.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

Walkthrough

The pull request adds a shared documentation-slug filter that excludes draft and repository-artifact paths. The sitemap now uses this filter, and tests cover excluded and retained slug examples.

Changes: Docs sitemap filtering

Layer / File(s) Summary
Add and test the shared slug predicate
src/utils/sitemap-docs.ts, tests/sitemap-docs.test.ts
isHighValueDocsSlug excludes empty slugs, specified path segments, and exact low-value slugs. Tests cover excluded and retained examples.
Use the shared predicate in the sitemap
src/utils/sitemap.ts
The sitemap imports isHighValueDocsSlug and removes its local filter implementation and low-value sets.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: ladybluenotes

Merge Risk: Minimal · up to adab8

The change excludes documentation artifacts from the sitemap. No merge-blocking risk is established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: excluding documentation artifacts from the sitemap.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 3 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com adab863 Commit Preview URL

Branch Preview URL
Nov 01 2026, 04:53 AM

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