优化:使用 vitepress-plugin-pagefind 离线搜索插件替换 vitepress-plugin-search 插件,中文搜索相对友好一些(毕竟国人写的)

This commit is contained in:
2023-03-29 21:23:25 +08:00
parent 8af09b2b72
commit f7781ac328
5 changed files with 70 additions and 127 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 202 KiB

View File

@@ -1,13 +1,15 @@
import { defineConfig } from 'vite';
import Components from 'unplugin-vue-components/vite';
import { ArcoResolver } from 'unplugin-vue-components/resolvers';
// import { SearchPlugin } from 'vitepress-plugin-search';
// import { pagefindPlugin } from 'vitepress-plugin-pagefind';
export default defineConfig({
plugins: [
// SearchPlugin({
// encode: false,
// tokenize: 'full',
// pagefindPlugin({
// btnPlaceholder: '搜索',
// placeholder: '搜索文档',
// emptyText: '空空如也',
// heading: '共 {{searchResult}} 条结果'
// }),
Components({
dirs: ['.vitepress/theme/components'],