From 626ced033ace724952fad0a0b4378f5f0bd00255 Mon Sep 17 00:00:00 2001 From: Peter Amiri Date: Wed, 6 May 2026 05:06:52 -0700 Subject: [PATCH] docs(docs): fix 404 on v3 config-migration page from v4 upgrade guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- web/sites/guides/astro.config.mjs | 6 ++++++ ....0.0-config-migration.md => 3-0-0-config-migration.md} | 0 web/sites/guides/src/sidebars/v3-0-0.json | 8 +++++++- 3 files changed, 13 insertions(+), 1 deletion(-) rename web/sites/guides/src/content/docs/v3-0-0/upgrading/{3.0.0-config-migration.md => 3-0-0-config-migration.md} (100%) diff --git a/web/sites/guides/astro.config.mjs b/web/sites/guides/astro.config.mjs index c3ea1af170..07a536bae2 100644 --- a/web/sites/guides/astro.config.mjs +++ b/web/sites/guides/astro.config.mjs @@ -78,6 +78,12 @@ export default defineConfig({ // documented Phase 0 URLs are redirected. '/v4-0-0-snapshot/cli-reference': '/v4-0-0-snapshot/command-line-tools/', '/v4-0-0-snapshot/cli-reference/info': '/v4-0-0-snapshot/command-line-tools/', + // Astro/Starlight slugs the dotted filename `3.0.0-config-migration.md` + // down to `300-config-migration` (github-slugger strips dots). The file + // was renamed to `3-0-0-config-migration.md` so the URL matches every + // other doc in the tree; this redirect preserves the original ugly slug + // for any external bookmarks accumulated while it was live. + '/v3-0-0/upgrading/300-config-migration': '/v3-0-0/upgrading/3-0-0-config-migration/', }, integrations: [ starlight({ diff --git a/web/sites/guides/src/content/docs/v3-0-0/upgrading/3.0.0-config-migration.md b/web/sites/guides/src/content/docs/v3-0-0/upgrading/3-0-0-config-migration.md similarity index 100% rename from web/sites/guides/src/content/docs/v3-0-0/upgrading/3.0.0-config-migration.md rename to web/sites/guides/src/content/docs/v3-0-0/upgrading/3-0-0-config-migration.md diff --git a/web/sites/guides/src/sidebars/v3-0-0.json b/web/sites/guides/src/sidebars/v3-0-0.json index e746dab2be..df100aab03 100644 --- a/web/sites/guides/src/sidebars/v3-0-0.json +++ b/web/sites/guides/src/sidebars/v3-0-0.json @@ -42,7 +42,13 @@ }, { "label": "Upgrading", - "link": "/v3-0-0/introduction/upgrading/" + "link": "/v3-0-0/introduction/upgrading/", + "items": [ + { + "label": "Config Directory Migration (3.0.0)", + "link": "/v3-0-0/upgrading/3-0-0-config-migration/" + } + ] }, { "label": "Screencasts",