feat(docs): 添加搜索

This commit is contained in:
roymondchen 2022-06-14 14:50:38 +08:00 committed by jia000
parent 470033487c
commit 4e812c396d
3 changed files with 24 additions and 3 deletions

View File

@ -21,6 +21,7 @@
"@vuepress/bundler-vite": "^2.0.0-beta.48",
"@vuepress/cli": "^2.0.0-beta.48",
"@vuepress/client": "^2.0.0-beta.48",
"@vuepress/plugin-search": "^2.0.0-beta.48",
"@vuepress/theme-default": "^2.0.0-beta.48",
"vuepress": "^2.0.0-beta.48"
}

View File

@ -1,6 +1,7 @@
import { viteBundler } from '@vuepress/bundler-vite'
import { defineUserConfig } from '@vuepress/cli'
import { defaultTheme } from '@vuepress/theme-default'
import { viteBundler } from '@vuepress/bundler-vite';
import { defineUserConfig } from '@vuepress/cli';
import { defaultTheme } from '@vuepress/theme-default';
const { searchPlugin } = require('@vuepress/plugin-search');
import path from 'path';
@ -172,6 +173,9 @@ export default defineUserConfig({
contributors: false,
}),
plugins: [
searchPlugin(),
],
bundler: viteBundler({
vuePluginOptions: {
template: {

16
pnpm-lock.yaml generated
View File

@ -77,6 +77,7 @@ importers:
'@vuepress/bundler-vite': ^2.0.0-beta.48
'@vuepress/cli': ^2.0.0-beta.48
'@vuepress/client': ^2.0.0-beta.48
'@vuepress/plugin-search': ^2.0.0-beta.48
'@vuepress/theme-default': ^2.0.0-beta.48
element-plus: ^2.2.0
highlight.js: ^11.2.0
@ -98,6 +99,7 @@ importers:
'@vuepress/bundler-vite': 2.0.0-beta.48
'@vuepress/cli': 2.0.0-beta.48
'@vuepress/client': 2.0.0-beta.48
'@vuepress/plugin-search': 2.0.0-beta.48
'@vuepress/theme-default': 2.0.0-beta.48
vuepress: 2.0.0-beta.48_cvdz5rjhltiqfsopd7oft5nvg4
@ -2288,6 +2290,20 @@ packages:
- supports-color
dev: true
/@vuepress/plugin-search/2.0.0-beta.48:
resolution: {integrity: sha512-1ADG3Zw6CBwERiW5l3spoONrHT6pcOGzlEiOhjAEYcOv7edzaoGQTahpgGvCXiXY5b11Z9bsr13NgCgr0YMGIQ==}
dependencies:
'@vuepress/client': 2.0.0-beta.48
'@vuepress/core': 2.0.0-beta.48
'@vuepress/shared': 2.0.0-beta.48
'@vuepress/utils': 2.0.0-beta.48
chokidar: 3.5.3
vue: 3.2.37
vue-router: 4.0.15_vue@3.2.37
transitivePeerDependencies:
- supports-color
dev: true
/@vuepress/plugin-theme-data/2.0.0-beta.48:
resolution: {integrity: sha512-7DH/tKiPg63wA77C9xNVF5Le5r1Apmd9mvz4NEeG0dhmuSPr456oM8aApE0s1XkY+vrmIXsTUjDK8+HvF8irUQ==}
dependencies: