[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
Draft
[Routes] Eliminate route collision warnings from shadowed stubs, duplicate slugs, RSS conflicts, and llms.txt dupes#32585mvvmm wants to merge 1 commit into
mvvmm wants to merge 1 commit into
Conversation
…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)
kodster28
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Four distinct route collision sources, all fixed without URL changes or redirects:
1. Content stubs shadowing explicit
src/pagesroutes (4 routes)Wrapped
getDocsStaticPathsinsrc/pages/[...slug].astroto filter out content stubs that have a corresponding explicit page:ai/modelsworkers-ai/modelsruleset-engine/rules-language/fields/referencewaf/change-log/changelog2. Duplicate changelog post slugs (1 collision)
getChangelogs()insrc/util/changelog.tsstrips 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.mdxandworkers/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.xmlwas generated by both[product].xml.ts(product IDcloudflare-one) and[area].xml.ts(group slugcloudflare-one). Fixed by making[area].xml.tsskip 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.txtstatic paths (3 collisions)Four SDK directory entries (
sdk,go-sdk,python-sdk,typescript-sdk) shareentry.url: /fundamentals/api/reference/sdks/, causing[...product]/llms.txt.tsto emit the same static path 4 times. Now deduplicates by URL path, keeping only the first entry per URL.Results
Could not renderroute conflictsThe Nimbus
duplicate-sluginformational warning (3 routes) persists — it is emitted by the framework duringgetDocsStaticPathsbefore our filter runs. The actual route conflicts are eliminated.Checklist
pnpm run check— 0 errorspnpm run build— 8,803 pages, no new warningspnpm exec prettier— clean