-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
35 lines (34 loc) · 914 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
29
30
31
32
33
34
35
const path = require('path');
// Theme API.
module.exports = (options, ctx) => ({
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'),
};
},
permalink: '/blog/:slug',
plugins: [
path.resolve(__dirname, 'plugins/blog/index.js'),
'@vuepress/active-header-links',
'@vuepress/plugin-nprogress',
'@vuepress/pagination',
'@vuepress/medium-zoom',
'@vuepress/back-to-top',
[
'@vuepress/search',
{
searchMaxSuggestions: 10,
test: null,
},
],
],
});