-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmetalsmith.js
More file actions
32 lines (31 loc) · 824 Bytes
/
Copy pathmetalsmith.js
File metadata and controls
32 lines (31 loc) · 824 Bytes
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 permalinks = require('metalsmith-permalinks');
var excerpts = require('metalsmith-excerpts');
var collections = require('metalsmith-collections');
var twig = require('metalsmith-twig');
Metalsmith(__dirname)
.metadata({
title: "My Static Site & Blog",
description: "It's about saying »Hello« to the World.",
generator: "Metalsmith",
url: "http://www.metalsmith.io/"
})
.source('./src')
.destination('./build')
.clean(false)
.use(collections({
posts: {
pattern: 'posts/*.md'
}
}))
.use(markdown())
.use(excerpts())
.use(permalinks())
.use(twig({
directory: 'presenters',
cache: false
}))
.build(function(err, files) {
if (err) { throw err; }
});