-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathindex.js
28 lines (27 loc) · 840 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const path = require('path')
// Theme API.
module.exports = (options, ctx) => ({
globalLayout: './layouts/GlobalLayout.vue',
alias () {
const { themeConfig, siteConfig } = ctx
// resolve algolia
const isAlgoliaSearch = (
themeConfig.algolia ||
Object.keys(siteConfig.locales && themeConfig.locales || {})
.some(base => themeConfig.locales[base].algolia)
)
return {
'@AlgoliaSearchBox': isAlgoliaSearch
? path.resolve(__dirname, 'components/AlgoliaSearchBox.vue')
: path.resolve(__dirname, 'noopModule.js')
}
},
plugins: [
['@vuepress/search', { searchMaxSuggestions: 30 }],
'@vuepress/nprogress',
['container', { type: 'tip' }],
['container', { type: 'warning' }],
['container', { type: 'danger' }],
require('./plugins/smoothScroll')
]
})