mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.Docs.git
synced 2025-11-19 21:16:31 +08:00
Merge branch 'config' into pnpm
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
import { defineUserConfig } from "vuepress";
|
import { defineUserConfig } from "vuepress";
|
||||||
import { viteBundler } from '@vuepress/bundler-vite'
|
import { viteBundler } from "@vuepress/bundler-vite";
|
||||||
import theme from "./theme.js";
|
import { docsearchPlugin } from "@vuepress/plugin-docsearch";
|
||||||
import { autoCatalogPlugin } from "vuepress-plugin-auto-catalog";
|
import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics";
|
||||||
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
|
|
||||||
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
|
|
||||||
import { redirectPlugin } from "vuepress-plugin-redirect";
|
import { redirectPlugin } from "vuepress-plugin-redirect";
|
||||||
|
import theme from "./theme.js";
|
||||||
|
|
||||||
export default defineUserConfig({
|
export default defineUserConfig({
|
||||||
base: "/",
|
base: "/",
|
||||||
@@ -12,10 +11,22 @@ export default defineUserConfig({
|
|||||||
dest: "./dist",
|
dest: "./dist",
|
||||||
|
|
||||||
head: [
|
head: [
|
||||||
['script', {async:"", defer:"", "data-website-id":"f586534f-1741-450e-a0f4-3c0189f993c9",
|
[
|
||||||
src:"https://umami.irain.in/umami.js"}, `
|
"script",
|
||||||
`],
|
{
|
||||||
['script', {type: "module", src:"https://get.microsoft.com/badge/ms-store-badge.bundled.js"}],
|
src: "https://umami.irain.in/umami.js",
|
||||||
|
"data-website-id": "f586534f-1741-450e-a0f4-3c0189f993c9",
|
||||||
|
async: "",
|
||||||
|
defer: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"script",
|
||||||
|
{
|
||||||
|
type: "module",
|
||||||
|
src: "https://get.microsoft.com/badge/ms-store-badge.bundled.js",
|
||||||
|
},
|
||||||
|
],
|
||||||
],
|
],
|
||||||
locales: {
|
locales: {
|
||||||
"/zh/": {
|
"/zh/": {
|
||||||
@@ -75,30 +86,29 @@ export default defineUserConfig({
|
|||||||
reportMissingResultsLinkText: "点击反馈",
|
reportMissingResultsLinkText: "点击反馈",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
"/en/": {
|
"/en/": {
|
||||||
placeholder: "Search documents",
|
placeholder: "Search documents",
|
||||||
translations: {
|
translations: {
|
||||||
button: {
|
button: {
|
||||||
buttonText: "Search documents"
|
buttonText: "Search documents",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}),
|
}),
|
||||||
googleAnalyticsPlugin({
|
googleAnalyticsPlugin({
|
||||||
id: "G-F3LFJCE3RM"
|
id: "G-F3LFJCE3RM",
|
||||||
}),
|
}),
|
||||||
redirectPlugin({
|
redirectPlugin({
|
||||||
defaultLocale: "/en/",
|
defaultLocale: "/en/",
|
||||||
defaultBehavior: "defaultLocale",
|
|
||||||
autoLocale: true,
|
autoLocale: true,
|
||||||
switchLocale: "modal",
|
switchLocale: "modal",
|
||||||
localeConfig: {
|
localeConfig: {
|
||||||
"/en/": ["en-US", "en-UK", "en"],
|
"/en/": ["en-US", "en-UK", "en"],
|
||||||
"/zh/": ["zh-CN", "zh-TW", "zh"],
|
"/zh/": ["zh-CN", "zh-TW", "zh"],
|
||||||
}
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -109,9 +119,8 @@ export default defineUserConfig({
|
|||||||
bundler: viteBundler({
|
bundler: viteBundler({
|
||||||
viteOptions: {
|
viteOptions: {
|
||||||
build: {
|
build: {
|
||||||
chunkSizeWarningLimit: 1500
|
chunkSizeWarningLimit: 1500,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
vuePluginOptions: {},
|
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user