-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.js
executable file
·47 lines (43 loc) · 1.28 KB
/
build.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
/*
* build.js
* Copyright (C) 2015 ronan <[email protected]>
*
* Distributed under terms of the MIT license.
*/
var Metalsmith = require('metalsmith'),
markdown = require('metalsmith-markdown'),
templates = require('metalsmith-templates')
collections = require('metalsmith-collections'),
permalinks = require('metalsmith-permalinks'),
tags = require('metalsmith-tags'),
dir = __dirname,
source = './src',
build = './'
;
var metadata = {
title: 'OpenWines',
description: 'Open-Data for Wines'
};
Metalsmith(dir)
.use(markdown())
.use(tags({
handle: 'tags', // yaml key for tag list in you pages
path: '/tags/:tag.html', // path for result pages
template: '/page.jade', // template to use for tag listing
sortBy: 'date', // provide posts sorted by 'date' (optional)
reverse: true // sort direction (optional)
}))
.use(collections({
pages: {
metadata: metadata
},
posts: {
metadata: metadata
}
}))
.use(permalinks({
pattern: ':title'
}))
.use(templates('jade'))
.destination(build)
.build()