Merge branch 'config' into pnpm

This commit is contained in:
Mr.Hope
2023-04-24 21:32:49 +08:00

View File

@@ -1,10 +1,9 @@
import { defineUserConfig } from "vuepress";
import { viteBundler } from '@vuepress/bundler-vite'
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 { viteBundler } from "@vuepress/bundler-vite";
import { docsearchPlugin } from "@vuepress/plugin-docsearch";
import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics";
import { redirectPlugin } from "vuepress-plugin-redirect";
import theme from "./theme.js";
export default defineUserConfig({
base: "/",
@@ -12,10 +11,22 @@ export default defineUserConfig({
dest: "./dist",
head: [
['script', {async:"", defer:"", "data-website-id":"f586534f-1741-450e-a0f4-3c0189f993c9",
src:"https://umami.irain.in/umami.js"}, `
`],
['script', {type: "module", src:"https://get.microsoft.com/badge/ms-store-badge.bundled.js"}],
[
"script",
{
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: {
"/zh/": {
@@ -75,30 +86,29 @@ export default defineUserConfig({
reportMissingResultsLinkText: "点击反馈",
},
},
}
},
},
"/en/": {
placeholder: "Search documents",
translations: {
button: {
buttonText: "Search documents"
}
}
}
}
buttonText: "Search documents",
},
},
},
},
}),
googleAnalyticsPlugin({
id: "G-F3LFJCE3RM"
id: "G-F3LFJCE3RM",
}),
redirectPlugin({
defaultLocale: "/en/",
defaultBehavior: "defaultLocale",
autoLocale: true,
switchLocale: "modal",
localeConfig: {
"/en/": ["en-US", "en-UK", "en"],
"/zh/": ["zh-CN", "zh-TW", "zh"],
}
},
}),
],
@@ -109,9 +119,8 @@ export default defineUserConfig({
bundler: viteBundler({
viteOptions: {
build: {
chunkSizeWarningLimit: 1500
}
chunkSizeWarningLimit: 1500,
},
},
vuePluginOptions: {},
}),
});