diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 9fe38fcf9..a2a79d7b8 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -4,6 +4,7 @@ import theme from "./theme.js"; import { autoCatalogPlugin } from "vuepress-plugin-auto-catalog"; import { docsearchPlugin } from '@vuepress/plugin-docsearch' import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics' +import { redirectPlugin } from "vuepress-plugin-redirect"; export default defineUserConfig({ base: "/", @@ -55,7 +56,14 @@ export default defineUserConfig({ }), googleAnalyticsPlugin({ id: "G-F3LFJCE3RM" - }) + }), + redirectPlugin({ + autoLocale: true, + localeConfig: { + "/en/": ["en-US", "en-UK", "en"], + "/zh/": ["zh-CN", "zh-TW", "zh"], + }, + }), ], theme, diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 6774dbcbe..000000000 --- a/docs/README.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -home: true -icon: home -title: Language Selection -heroImage: https://img.alicdn.com/imgextra/i4/1797064093/O1CN01vK3m2w1g6duwt8quS_!!1797064093.png -heroText: Snap Hutao -tagline: Select Your Language -actions: - - text: zh-CN - link: /zh/ - type: primary - - text: en-US - link: /en/ - type: primary - - -copyright: false -footer: MIT Licensed | Copyright © 2019-present Mr.Hope ----