-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
57 lines (54 loc) · 1.26 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
// import getPureText from './getPureText'
var getPureText = require('./getPureText')
module.exports = {
routes: {
path: '/',
component: './Layout',
indexRoute: {
component: './Archive',
},
childRoutes: [
{
path: 'posts/:page',
component: './Archive'
},
{
path: 'tags',
component: './Tags'
},
{
path: 'tags/:tag',
component: './TagDetail'
},
{
path: '*',
component: './Post'
}
]
},
notFound: './NotFound',
root: './template',
config: {
pageSize: 6 ,
title: 'crystal',
blogName: 'crystal', // the text in the header of blog pages
avatarUrl: 'avatar.png', // put your avatar image under ~./extra/
gitment: {
owner: 'Claiyre',
repo: 'Claiyre.github.io',
oauth: {
client_id: 'xxx',
client_secret: 'xxxx'
}
}
},
picker: function(metaData, gift, require) {
var content = gift.content,
filename = gift.filename,
getMarkdownData = gift.getMarkdownData,
path = gift.path;
content = getPureText(content);
// autoKeyword(metaData, gift, {name: 'keywords'})
return Object.assign(metaData, {desc: content.slice(0, 200)})
},
}