Skip to content

fix: exclude dynamic templates from sitemap - #729

Closed
juandolealt wants to merge 2 commits into
mainfrom
agent/exclude-blog-template-from-sitemap
Closed

juandolealt wants to merge 2 commits into
mainfrom
agent/exclude-blog-template-from-sitemap

Conversation

@juandolealt

@juandolealt juandolealt commented Jul 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Exclude bracketed dynamic route templates at Vocs sitemap generation time
  • Keep concrete blog URLs and the existing sitemap finalizer intact
  • Make the finalizer a safe no-op when non-production builds do not emit a sitemap
  • Add regression coverage for concrete and dynamic routes

Why

The live sitemap currently emits /developers/blog/[slug], which resolves to a 404 and causes the tempo-web external sitemap check to fail. Filtering the template at the generator is more reliable than depending only on late post-processing.

The latest main finalizer also assumed every build emits dist/public/sitemap.xml. E2E builds do not, so this PR handles the missing-file case without hiding other filesystem errors.

Validation

  • CI=true pnpm build
  • VERCEL_ENV=production pnpm build
  • CI=true pnpm exec vitest run src/lib/sitemap.test.ts
  • pnpm exec biome check src/lib/sitemap.ts src/lib/sitemap.test.ts scripts/finalize-sitemap.ts vocs.config.ts
  • Confirmed the generated production sitemap contains no bracketed routes and retains both published blog URLs

@vercel

vercel Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tempo-docs Ready Ready Preview, Comment Jul 29, 2026 1:25am

Request Review

@juandolealt

Copy link
Copy Markdown
Member Author

Closing as superseded by #768 and #770. Current main already excludes bracketed dynamic route templates at generation time, preserves concrete blog and OpenAPI routes during sitemap finalization, and validates deployed sitemap coverage in CI. Verification against the resolved current-main tree covered 308 unit tests, type checking, a production build, generated-link and Markdown audits, and sitemap validation for 48 canonical API routes. The live sitemap currently contains 230 URLs, three concrete blog URLs, and no bracketed template URLs.

This branch was successfully deployed

1 active deployment
Preview — eb14d489 Deployed Jul 29, 2026 by vercel[bot]
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