|
1 | 1 | import { viteBundler } from '@vuepress/bundler-vite'
|
2 | 2 | import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
|
| 3 | +import { docsearchPlugin } from '@vuepress/plugin-docsearch' |
3 | 4 | import { searchPlugin } from '@vuepress/plugin-search'
|
4 | 5 | import { defaultTheme } from '@vuepress/theme-default'
|
5 | 6 | import { defineUserConfig } from 'vuepress/cli'
|
6 | 7 | import { getDirname, path } from 'vuepress/utils'
|
7 | 8 |
|
8 |
| - |
9 | 9 | const __dirname = import.meta.dirname || getDirname(import.meta.url)
|
10 | 10 |
|
11 | 11 | export default defineUserConfig({
|
12 | 12 | lang: 'zh-CN',
|
13 | 13 | title: 'Mapbox GL JS Cookbook',
|
14 | 14 | description: 'Mapbox GL JS Cookbook',
|
15 | 15 | base: '/mapbox-gl-js-cookbook/',
|
16 |
| - head: [['link', { rel: 'icon', href: '/mapbox-gl-js-cookbook/assets/logo.png' }]], |
| 16 | + head: [ |
| 17 | + ['link', { rel: 'icon', href: '/mapbox-gl-js-cookbook/assets/logo.png' }], |
| 18 | + // <meta name="algolia-site-verification" content="5BFCC22EEF46CEE6" /> |
| 19 | + ['meta', { name: 'algolia-site-verification', content: '5BFCC22EEF46CEE6' }], |
| 20 | + ], |
17 | 21 | alias: {
|
18 | 22 | '@': path.resolve(__dirname, './'),
|
19 | 23 | },
|
20 | 24 | plugins: [
|
21 |
| - searchPlugin({ |
22 |
| - // 配置项 |
| 25 | + // searchPlugin({ |
| 26 | + // // 配置项 |
| 27 | + // }), |
| 28 | + docsearchPlugin({ |
| 29 | + appId: 'O28CRXQHGQ', |
| 30 | + apiKey: 'fa3d7a24cc80e676ff6553e308f28527', |
| 31 | + indexName: 'naivemap', |
| 32 | + locales: { |
| 33 | + '/': { |
| 34 | + placeholder: '搜索文档', |
| 35 | + translations: { |
| 36 | + button: { |
| 37 | + buttonText: '搜索文档', |
| 38 | + }, |
| 39 | + }, |
| 40 | + }, |
| 41 | + }, |
23 | 42 | }),
|
24 | 43 | registerComponentsPlugin({
|
25 | 44 | // 配置项
|
|
0 commit comments