Skip to content

Commit fa4804e

Browse files
authored
docs: add redirect v2 (web-infra-dev#8335)
1 parent 28cf50a commit fa4804e

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"update-rspress": "npx taze major --include /rspress/ -w -r -l",
4141
"update-rsbuild": "npx taze major --include /rsbuild/ -w -r -l",
4242
"gen:docs": "rm -rf doc_output && mkdir doc_output && cp -r ./packages/document/doc_build/* ./doc_output",
43-
"build:docs": "pnpm --filter @modern-js/main-doc... build && npm run gen:docs"
43+
"docs:v2-link": "echo '/v2/* https://modernjs-v2.netlify.app/:splat 200' >> doc_output/_redirects",
44+
"build:docs": "pnpm --filter @modern-js/main-doc... build && npm run gen:docs && npm run docs:v2-link"
4445
},
4546
"engines": {
4647
"node": ">=20",

packages/document/docs/en/_nav.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
},
3232
{
3333
"text": "Modern.js 2.x Docs",
34-
"link": "https://modernjs.dev/guides/get-started/introduction.html"
34+
"link": "https://modernjs.dev/v2"
3535
}
3636
]

packages/document/docs/zh/_nav.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
},
3232
{
3333
"text": "Modern.js 2.x 文档",
34-
"link": "https://modernjs.dev/zh/guides/get-started/introduction.html"
34+
"link": "https://modernjs.dev/v2/zh/"
3535
}
3636
]

0 commit comments

Comments
 (0)