forked from magicode/netfree-www-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
32 lines (30 loc) · 807 Bytes
/
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
var Metalsmith = require('metalsmith');
var markdown = require('metalsmith-markdown');
var layouts = require('metalsmith-layouts');
var permalinks = require('metalsmith-permalinks');
var moment = require("moment");
Metalsmith(__dirname)
.metadata({
mainTitle: "NETFREE - נטפרי",
description: "",
root: '/pages/'
})
.source('./src')
.destination('./build')
.clean(false)
.use(markdown())
.use(permalinks())
.use(layouts({
engine: 'handlebars',
partials: 'layouts/partials',
helpers: {
formatDate: function(datetime, format) {
return moment(datetime).format(format);
}
}
}))
.build(function(err, files) {
if (err) {
throw err;
}
});