-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (35 loc) · 983 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
36
37
var marked = require('marked');
var colors = require('./src/alc-colors.json');
module.exports = {
hooks: {
config: function(config) {
config.colors = colors;
return config;
}
},
website: {
assets: "./_assets",
css: [
"website/alc-style.css"
]
},
// Extend templating blocks
blocks: {
// Author will be able to write "{% aside %}World{% endaside %}"
aside: {
process: function(blk) {
var arg1 = (blk.args[0]) ? blk.args[0] : 'callout',
arg2 = (blk.args[1]) ? blk.args[1] : 'default',
argClass = arg1 + ' ' + arg1 + '-' + arg2;
return '<aside class="' + argClass + '">'
+ marked(blk.body)
+ '</aside>';
}
},
markdownless: {
process: function(blk) {
return blk.body;
}
}
}
};