Skip to content

fix: exclude dynamic templates from sitemap#729

Open
juandolealt wants to merge 1 commit into
mainfrom
agent/exclude-blog-template-from-sitemap
Open

fix: exclude dynamic templates from sitemap#729
juandolealt wants to merge 1 commit 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 20, 2026 11:45pm

Request Review

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