mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
fix(site): docs for v6.0.1 changelog page, refresh instantly, 404 (#56038)
* fix(site): changelog page, refresh instantly, 404 * chore: update * fix: 修复追加部分路由在浏览器中刷新出现404 问题 出现 404 问题主要问题是 umijs 的 ssr 提取静态文件未生效。 需要将配置的 router id 和 path 全等,才会进入 pre-render 逻辑 * chore: update --------- Co-authored-by: 𝑾𝒖𝒙𝒉 <wxh1220@gmail.com>
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user