-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
57 lines (56 loc) · 1.66 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
const path = require('path')
module.exports = {
layoutDir: './src/layouts',
plugins: [
['@vuepress/back-to-top'],
['@vuepress/medium-zoom'],
['@vuepress/google-analytics'],
['@vuepress/active-header-links'],
['@vuepress/register-components', {
componentsDir: [
path.resolve(__dirname, 'components')
]
}],
['@yubisaki/blog', {
pageEnhancers: [
{
when: ({ frontmatter }) => frontmatter.pageLayout === 'Activity',
frontmatter: { layout: 'Activity' }
},
{
when: ({ frontmatter }) => frontmatter.pageLayout === 'Home',
frontmatter: { layout: 'Home' }
},
{
when: ({ frontmatter }) => frontmatter.pageLayout === 'Layout',
frontmatter: { layout: 'Layout' }
},
{
when: ({ frontmatter }) => frontmatter.pageLayout === 'Weekly',
frontmatter: { layout: 'Weekly' }
},
{
when: ({ frontmatter }) => frontmatter.type === 'weekly',
frontmatter: { layout: 'Page' }
},
{
when: ({ path }) => path.startsWith('/weekly'),
frontmatter: { showAuthor: false, next: false, sidebar: false }
}
]
}],
['@yubisaki/pagination'],
'flowchart',
[require('./util/plugin')]
],
chainWebpack: config => {
const patterns = [
path.resolve(__dirname, './styles/config.styl'),
path.resolve(__dirname, './styles/mixins.styl')
]
config.module.rule('stylus').oneOf('normal')
.use('style-resource')
.loader('style-resources-loader')
.options({ patterns })
}
}