From 6339b669e79bb8c12e12151d619f71ff11fea59d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 13:20:49 +0800 Subject: [PATCH] chore: cherry-pick changelog route fix from PR #56038 to 5.x-stable docs (#56138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: 𝑾𝒖𝒙𝒉 --- .dumi/theme/plugin.ts | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.dumi/theme/plugin.ts b/.dumi/theme/plugin.ts index 450267c141..29f4d5fd4c 100644 --- a/.dumi/theme/plugin.ts +++ b/.dumi/theme/plugin.ts @@ -157,21 +157,11 @@ const RoutesPlugin = async (api: IApi) => { api.modifyRoutes((routes) => { // TODO: append extra routes, such as home, changelog, form-v3 + /** + * **important!** Make sure that the `id` and `path` are consistent. + * see: https://github.com/ant-design/ant-design/issues/55960 + */ const extraRoutesList: IRoute[] = [ - { - id: 'changelog-cn', - path: 'changelog-cn', - absPath: '/changelog-cn', - parentId: 'DocLayout', - file: resolve('../../CHANGELOG.zh-CN.md'), - }, - { - id: 'components-changelog-cn', - path: 'components/changelog-cn', - absPath: '/changelog-cn', - parentId: 'DocLayout', - file: resolve('../../CHANGELOG.zh-CN.md'), - }, { id: 'changelog', path: 'changelog', @@ -180,12 +170,26 @@ const RoutesPlugin = async (api: IApi) => { file: resolve('../../CHANGELOG.en-US.md'), }, { - id: 'components-changelog', + id: 'changelog-cn', + path: 'changelog-cn', + absPath: '/changelog-cn', + parentId: 'DocLayout', + file: resolve('../../CHANGELOG.zh-CN.md'), + }, + { + id: 'components/changelog', path: 'components/changelog', - absPath: '/changelog', + absPath: '/components/changelog', parentId: 'DocLayout', file: resolve('../../CHANGELOG.en-US.md'), }, + { + id: 'components/changelog-cn', + path: 'components/changelog-cn', + absPath: '/components/changelog-cn', + parentId: 'DocLayout', + file: resolve('../../CHANGELOG.zh-CN.md'), + }, ]; extraRoutesList.forEach((itemRoute) => {