Skip to content

Conversation

@jaffrepaul
Copy link
Contributor

The sitemap.xml route was attempting to scan the /docs directory at runtime, but this directory is excluded from the Vercel serverless function bundle via outputFileTracingExcludes to reduce bundle size.

Changes:

  • Modified sitemap.ts to use getDocsRootNode() instead of getDocsFrontMatter(), loading from pre-generated doctree.json
  • Added extractSlugsFromDocTree() helper to recursively extract all page paths from the doctree's nested DocNode structure
  • Added sitemap.xml to outputFileTracingIncludes in next.config.ts to include doctree.json/doctree-dev.json in the function bundle

Fixes DOCS-A4T

DESCRIBE YOUR PR

Tell us what you're changing and why. If your PR resolves an issue, please link it so it closes automatically.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

The sitemap.xml route was attempting to scan the /docs directory at
runtime, but this directory is excluded from the Vercel serverless
function bundle via outputFileTracingExcludes to reduce bundle size.

Changes:
- Modified sitemap.ts to use getDocsRootNode() instead of
  getDocsFrontMatter(), loading from pre-generated doctree.json
- Added extractSlugsFromDocTree() helper to recursively extract all
  page paths from the doctree's nested DocNode structure
- Added sitemap.xml to outputFileTracingIncludes in next.config.ts
  to include doctree.json/doctree-dev.json in the function bundle

Fixes DOCS-A4T

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
develop-docs Ready Ready Preview, Comment Jan 21, 2026 4:00am
sentry-docs Ready Ready Preview, Comment Jan 21, 2026 4:00am

Request Review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Synthetic nodes are created when there's a gap in the doc hierarchy but
don't correspond to actual pages. The sitemap was including these nodes
while generateStaticParams() only includes actual frontmatter entries,
causing sitemap URLs to return 404s.

Co-Authored-By: Claude <noreply@anthropic.com>
@jaffrepaul jaffrepaul merged commit 115b972 into master Jan 21, 2026
16 checks passed
@jaffrepaul jaffrepaul deleted the sitemap-load-error branch January 21, 2026 15:47
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.

4 participants