Skip to content

[Routes] Eliminate route collision warnings from shadowed stubs, duplicate slugs, RSS conflicts, and llms.txt dupes - #32585

Draft
mvvmm wants to merge 1 commit into
productionfrom
fix/route-collision-warnings
Draft

[Routes] Eliminate route collision warnings from shadowed stubs, duplicate slugs, RSS conflicts, and llms.txt dupes#32585
mvvmm wants to merge 1 commit into
productionfrom
fix/route-collision-warnings

Conversation

@mvvmm

@mvvmm mvvmm commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What changed

Four distinct route collision sources, all fixed without URL changes or redirects:

1. Content stubs shadowing explicit src/pages routes (4 routes)

Wrapped getDocsStaticPaths in src/pages/[...slug].astro to filter out content stubs that have a corresponding explicit page:

  • ai/models
  • workers-ai/models
  • ruleset-engine/rules-language/fields/reference
  • waf/change-log/changelog

2. Duplicate changelog post slugs (1 collision)

getChangelogs() in src/util/changelog.ts strips the product folder from the ID, causing entries from different folders with the same date-filename to collide (e.g. rules/2026-04-01-l4-transport-telemetry-fields.mdx and workers/2026-04-01-l4-transport-telemetry-fields.mdx). Now prefixes later occurrences with the product folder name.

3. RSS product/group path collision (1 collision)

/changelog/rss/cloudflare-one.xml was generated by both [product].xml.ts (product ID cloudflare-one) and [area].xml.ts (group slug cloudflare-one). Fixed by making [area].xml.ts skip any group slug that matches a directory entry ID. No URL changes or redirects needed — the product feed owns the colliding URL.

4. Duplicate llms.txt static paths (3 collisions)

Four SDK directory entries (sdk, go-sdk, python-sdk, typescript-sdk) share entry.url: /fundamentals/api/reference/sdks/, causing [...product]/llms.txt.ts to emit the same static path 4 times. Now deduplicates by URL path, keeping only the first entry per URL.

Results

Metric Before After
Could not render route conflicts 9 0
Pages built 8,802 8,803

The Nimbus duplicate-slug informational warning (3 routes) persists — it is emitted by the framework during getDocsStaticPaths before our filter runs. The actual route conflicts are eliminated.

Checklist

  • pnpm run check — 0 errors
  • pnpm run build — 8,803 pages, no new warnings
  • pnpm exec prettier — clean

…icate changelog slugs, RSS conflicts, and llms.txt dupes

Filter content stubs with explicit src/pages routes from getDocsStaticPaths
(ai/models, workers-ai/models, ruleset-engine/.../reference, waf/.../changelog).
Deduplicate changelog post slugs by prefixing with product folder when
entries from different folders share the same date-filename. Skip area RSS
group slugs that collide with product IDs in [area].xml.ts getStaticPaths.
Deduplicate llms.txt static paths by URL when multiple directory entries
share the same entry.url (e.g. SDK variants).

Results:
- "Could not render" route conflict warnings: 9 -> 0
- No redirects needed (area RSS collision resolved by skipping colliding slugs)
- Pages built: 8803 (was 8802)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants