diff --git a/docs/package.json b/docs/package.json index 6c8a8f3f..c5b83ca9 100644 --- a/docs/package.json +++ b/docs/package.json @@ -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" } diff --git a/docs/src/.vuepress/config.ts b/docs/src/.vuepress/config.ts index 0f934f36..2e73baa9 100644 --- a/docs/src/.vuepress/config.ts +++ b/docs/src/.vuepress/config.ts @@ -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: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b59842c4..bc8afe4e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -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: