forked from Huxpro/huxpro.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-md-post.json
33 lines (33 loc) · 1021 Bytes
/
create-md-post.json
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
{
"filename": "({ attributes }) => { const changeCase = require('change-case'); return changeCase.headerCase(attributes.date + '-' + attributes.title) + '.md'; }",
"order": [
"date",
"title",
"subtitle",
"tags"
],
"template": "_posts/template.md",
"attributes": {
"title": {
"type": "string",
"message": "Enter post's title",
"default": "() => ''"
},
"subtitle": {
"type": "string",
"message": "Enter post's subtitle",
"default": "({ conf }) => { return conf.has('subtitle') ? conf.get('subtitle') : '' }",
"callback": "({ attributes }) => { conf.set('subtitle', attributes.subtitle); }"
},
"date": {
"type": "string",
"message": "Enter post's created date",
"default": "() => { return new Date().toLocaleDateString('ko-KR', { year: \"numeric\" , month: \"2-digit\", day:\"2-digit\" })}"
},
"tags": {
"type": "list/comma",
"message": "Enter post's tags",
"default": "() => ''"
}
}
}