Skip to content

Commit 59502d7

Browse files
author
Lévai Norbert
committed
Update search
1 parent d6c43ef commit 59502d7

File tree

4 files changed

+318
-2
lines changed

4 files changed

+318
-2
lines changed

docs/.vuepress/config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defaultTheme } from '@vuepress/theme-default'
22
import { defineUserConfig } from 'vuepress/cli'
33
import { viteBundler } from '@vuepress/bundler-vite'
4+
import { searchProPlugin } from "vuepress-plugin-search-pro";
45

56
export default defineUserConfig({
67
lang: 'en-US',
@@ -262,6 +263,20 @@ export default defineUserConfig({
262263
],
263264
},
264265
}),
266+
267+
plugins: [
268+
searchProPlugin({
269+
// Index all content
270+
indexContent: true,
271+
// Customize the fields to index
272+
customFields: [
273+
{
274+
getter: (page) => page.frontmatter.tags,
275+
formatter: "Tag: $content",
276+
},
277+
],
278+
}),
279+
],
265280

266281
bundler: viteBundler({
267282
viteOptions: {

package-lock.json

Lines changed: 191 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"sass": "^1.81.0",
1717
"sass-embedded": "^1.81.0",
1818
"vue": "^3.4.0",
19-
"vuepress": "^2.0.0-rc.7"
19+
"vuepress": "^2.0.0-rc.7",
20+
"vuepress-plugin-search-pro": "^2.0.0-rc.59"
2021
},
2122
"dependencies": {
2223
"20": "^3.1.9",

0 commit comments

Comments
 (0)