mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.Docs.git
synced 2025-11-19 21:16:31 +08:00
Enable search feature
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { defineUserConfig } from "vuepress";
|
||||
import { viteBundler } from '@vuepress/bundler-vite'
|
||||
import theme from "./theme.js";
|
||||
import { searchProPlugin } from "vuepress-plugin-search-pro";
|
||||
|
||||
export default defineUserConfig({
|
||||
base: "/",
|
||||
@@ -26,6 +27,21 @@ export default defineUserConfig({
|
||||
},
|
||||
},
|
||||
|
||||
plugins: [
|
||||
searchProPlugin({
|
||||
indexContent: true,
|
||||
customFields:[
|
||||
{
|
||||
getter: (page) => page.frontmatter.category,
|
||||
formatter: {
|
||||
"/": "分类: $content",
|
||||
"/en/": "Category:$content",
|
||||
},
|
||||
},
|
||||
]
|
||||
})
|
||||
],
|
||||
|
||||
theme,
|
||||
|
||||
shouldPrefetch: false,
|
||||
|
||||
Reference in New Issue
Block a user