git ssb

1+

gb / gwenbell.com



Tree: 29cbca91d096d67f75fb87a765745d93a1b57342

Files: 29cbca91d096d67f75fb87a765745d93a1b57342 / index.js

1156 bytesRaw
1var metalsmith = require('metalsmith'),
2 markdown = require('metalsmith-markdown'),
3 layouts = require('metalsmith-layouts'),
4 permalinks = require('metalsmith-permalinks'),
5 collections = require('metalsmith-collections'),
6 koa = require('koa'),
7 serve = require('koa-static'),
8 moment = require('moment');
9
10metalsmith(__dirname)
11 .metadata({
12 site: {
13 title: 'Gwen Bell',
14 url: 'http://gwenbell.com/',
15 author: 'Gwendolyn Bell',
16 photo: 'g.jpg'
17 }
18 })
19 .use(markdown())
20 .use(collections({
21 blog: {
22 pattern: './blog/*.md',
23 sortBy: 'date',
24 reverse: true
25 },
26 }))
27 .use(permalinks({
28 pattern: ':collections/:title'
29 }))
30 .use(layouts({
31 engine: 'jade',
32 moment
33 }))
34 .destination('./build')
35 .build(function(err) {
36 if (err) {throw err;}
37 else { console.log('success. mezcalle is built.'); }
38 });
39
40 var app = koa();
41
42 app.use(serve(__dirname + '/build'));
43
44 app.listen('8000');
45 console.log('koa is listening at http://localhost:8000');
46

Built with git-ssb-web