mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.Docs.git
synced 2025-11-19 21:16:31 +08:00
add auto locale config
This commit is contained in:
@@ -4,6 +4,7 @@ import theme from "./theme.js";
|
|||||||
import { autoCatalogPlugin } from "vuepress-plugin-auto-catalog";
|
import { autoCatalogPlugin } from "vuepress-plugin-auto-catalog";
|
||||||
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
|
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
|
||||||
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
|
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
|
||||||
|
import { redirectPlugin } from "vuepress-plugin-redirect";
|
||||||
|
|
||||||
export default defineUserConfig({
|
export default defineUserConfig({
|
||||||
base: "/",
|
base: "/",
|
||||||
@@ -55,7 +56,14 @@ export default defineUserConfig({
|
|||||||
}),
|
}),
|
||||||
googleAnalyticsPlugin({
|
googleAnalyticsPlugin({
|
||||||
id: "G-F3LFJCE3RM"
|
id: "G-F3LFJCE3RM"
|
||||||
})
|
}),
|
||||||
|
redirectPlugin({
|
||||||
|
autoLocale: true,
|
||||||
|
localeConfig: {
|
||||||
|
"/en/": ["en-US", "en-UK", "en"],
|
||||||
|
"/zh/": ["zh-CN", "zh-TW", "zh"],
|
||||||
|
},
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
|
|
||||||
theme,
|
theme,
|
||||||
|
|||||||
@@ -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
|
|
||||||
---
|
|
||||||
Reference in New Issue
Block a user