according to new them version move search plugin config to theme config

This commit is contained in:
mahula 2023-12-30 11:16:01 +01:00
parent 3c885062ae
commit a63a723b1f
3 changed files with 16 additions and 20 deletions

View File

@ -1,10 +1,8 @@
import { defineUserConfig } from 'vuepress' import { defineUserConfig } from 'vuepress'
import meta from './config/meta' import meta from './config/meta'
import theme from './config/theme' import theme from './config/theme'
import plugins from './config/plugins'
export default defineUserConfig({ export default defineUserConfig({
...meta, ...meta,
theme, theme,
plugins,
}) })

View File

@ -1,18 +0,0 @@
import { searchProPlugin } from 'vuepress-plugin-search-pro'
export default [
searchProPlugin({
indexContent: true,
autoSuggestions: true,
customFields: [
{
getter: (page) => page.frontmatter.category,
formatter: "Category: $content",
},
{
getter: (page) => page.frontmatter.tag,
formatter: "Tag: $content",
},
],
}),
]

View File

@ -53,4 +53,20 @@ export default hopeTheme({
] ]
}, },
], ],
plugins: {
searchPro: {
indexContent: true,
autoSuggestions: true,
customFields: [
{
getter: (page) => page.frontmatter.category,
formatter: "Category: $content",
},
{
getter: (page) => page.frontmatter.tag,
formatter: "Tag: $content",
},
],
},
},
}) })