Skip to content

Commit a434a64

Browse files
bpamiriclaude
andauthored
docs(docs): fix 404 on v3 config-migration page from v4 upgrade guide (#2429)
The link from /v4-0-0-snapshot/upgrading/2x-to-3x/ to the v3 Config Directory Migration page 404'd because the file was named 3.0.0-config-migration.md and Astro's slug generator strips dots entirely rather than converting them to dashes, producing the unintuitive URL /v3-0-0/upgrading/300-config-migration/. PR #2181 introduced the link assuming dots-to-dashes — that assumption was incorrect. - Rename file to 3-0-0-config-migration.md so the URL matches every other doc filename in the tree and the existing link works as written. - Add redirect from /300-config-migration/ to preserve any external bookmarks accumulated while the dotted-slug URL was live. - Add a sidebar entry under INTRODUCTION > Upgrading; the page was orphaned from v3-0-0.json entirely. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b16da86 commit a434a64

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

web/sites/guides/astro.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ export default defineConfig({
7878
// documented Phase 0 URLs are redirected.
7979
'/v4-0-0-snapshot/cli-reference': '/v4-0-0-snapshot/command-line-tools/',
8080
'/v4-0-0-snapshot/cli-reference/info': '/v4-0-0-snapshot/command-line-tools/',
81+
// Astro/Starlight slugs the dotted filename `3.0.0-config-migration.md`
82+
// down to `300-config-migration` (github-slugger strips dots). The file
83+
// was renamed to `3-0-0-config-migration.md` so the URL matches every
84+
// other doc in the tree; this redirect preserves the original ugly slug
85+
// for any external bookmarks accumulated while it was live.
86+
'/v3-0-0/upgrading/300-config-migration': '/v3-0-0/upgrading/3-0-0-config-migration/',
8187
},
8288
integrations: [
8389
starlight({

web/sites/guides/src/content/docs/v3-0-0/upgrading/3.0.0-config-migration.md renamed to web/sites/guides/src/content/docs/v3-0-0/upgrading/3-0-0-config-migration.md

File renamed without changes.

web/sites/guides/src/sidebars/v3-0-0.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@
4242
},
4343
{
4444
"label": "Upgrading",
45-
"link": "/v3-0-0/introduction/upgrading/"
45+
"link": "/v3-0-0/introduction/upgrading/",
46+
"items": [
47+
{
48+
"label": "Config Directory Migration (3.0.0)",
49+
"link": "/v3-0-0/upgrading/3-0-0-config-migration/"
50+
}
51+
]
4652
},
4753
{
4854
"label": "Screencasts",

0 commit comments

Comments
 (0)