-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
79 lines (79 loc) · 2.36 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
const path = require('path')
module.exports = (options, {themeConfig}) => {
/**
* 默认主题配置
*/
themeConfig = Object.assign(themeConfig, {
blogTitle: themeConfig.blogTitle || 'San\' qi',
homeCoverHide: themeConfig.homeCoverHide || true,
nav: themeConfig.nav || [
{
text: '友链',
icon: 'ri-link',
link: '/link'
}
],
category: themeConfig.category || [
{
text: "经验分享",
link: "experience"
}
],
logo: themeConfig.logo || '/logo.png',
})
const plugins = [
['@vuepress/blog', themeConfig.blog || {
directories: [
{
id: 'post',
dirname: '_post',
path: '/',
frontmatter: {title: ''},
pagination: {
lengthPerPage: 10,
prevText: '',
nextText: ''
},
}
],
frontmatters: [
{
id: "tag",
keys: ['tag', 'tags'],
path: '/tags/',
frontmatter: {title: 'Tag'},
pagination: {
lengthPerPage: 10,
prevText: '',
nextText: ''
}
},
{
id: "category",
keys: ['category', 'categories'],
path: '/categories/',
frontmatter: {title: 'Category'},
pagination: {
lengthPerPage: 10,
prevText: '',
nextText: ''
}
}
],
}],
['@vuepress/nprogress'],
[require('./plugin/imageLazy'), {
loading: true,
loadingSrc: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
loadingWidth: 30,
loadingHeight: 30,
minWidth: 100,
minHeight: 100,
}],
require('./plugin/imageFancybox'),
require('./plugin/theme-utils'),
];
return {
plugins,
}
}