File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { defineUserConfig } from 'vuepress'
22import { viteBundler } from '@vuepress/bundler-vite'
33import { defaultTheme } from '@vuepress/theme-default'
4- import { backToTopPlugin } from '@vuepress/plugin-back-to-top' ;
54import { docsearchPlugin } from '@vuepress/plugin-docsearch'
6- // import { searchPlugin } from '@vuepress/plugin-search'
5+ import { searchPlugin } from '@vuepress/plugin-search'
76import { diceRollerPlugin } from '@dice-roller/vuepress-plugin-dice-roller' ;
87import { sidebarTree } from '../api/config' ;
9- import { mdEnhancePlugin } from 'vuepress-plugin-md-enhance' ;
10- import { copyCodePlugin } from '@vuepress/plugin-copy-code' ;
118
9+ const isDev = process . env . NODE_ENV === 'development' ;
1210const base = `/${ process . env . BASE_PATH || 'documentation' } /` ;
1311
1412export default defineUserConfig ( {
@@ -75,29 +73,24 @@ export default defineUserConfig({
7573 } ,
7674 } ) ,
7775 plugins : [
78- backToTopPlugin ( ) ,
79- copyCodePlugin ( ) ,
8076 diceRollerPlugin ( ) ,
81- docsearchPlugin ( {
82- apiKey : '01e04cdac0da20e46c358d3c975962bf' ,
83- appId : 'KJX1KIQOVL' ,
84- indexName : 'rpg-dice-roller'
85- } ) ,
86- /*searchPlugin({
87- hotKeys: [
88- {
89- key: 's',
90- ctrl: true,
91- },
92- {
93- key: '/',
94- ctrl: true,
95- }
96- ],
97- }),*/
98- mdEnhancePlugin ( {
99- codetabs : true ,
100- tabs : true ,
101- } ) ,
77+ isDev
78+ ? searchPlugin ( {
79+ hotKeys : [
80+ {
81+ key : 's' ,
82+ ctrl : true ,
83+ } ,
84+ {
85+ key : '/' ,
86+ ctrl : true ,
87+ }
88+ ] ,
89+ } )
90+ : docsearchPlugin ( {
91+ apiKey : '01e04cdac0da20e46c358d3c975962bf' ,
92+ appId : 'KJX1KIQOVL' ,
93+ indexName : 'rpg-dice-roller'
94+ } ) ,
10295 ] ,
10396} )
You can’t perform that action at this time.
0 commit comments