-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
executable file
·54 lines (51 loc) · 1.44 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
47
48
49
50
51
52
53
54
'use strict';
const Metalsmith = require('metalsmith');
const autoprefixer = require('metalsmith-autoprefixer');
const permalinks = require('metalsmith-permalinks');
const layouts = require('metalsmith-layouts');
// const cleanCSS = require('metalsmith-clean-css');
const copy = require('metalsmith-copy');
const mdattrs = require('markdown-it-attrs');
const mdFoot = require('markdown-it-footnote');
const sass = require('metalsmith-sass');
let markdown = require('metalsmith-markdownit');
let md = markdown('default');
md.parser.use(mdattrs).use(mdFoot);
new Metalsmith(__dirname)
.metadata({
site: {
title: 'Georgian Typography & Type Design',
url: 'https://alex-ketch.github.io/GeoType/'
}
})
.ignore(['_*.styl', '_*.css', '*.pug', '.DS_Store'])
.use(sass({
outputDir: 'assets/css/',
outputStyle: 'compact', // nested, expanded, compact, compressed
precision: 8
}))
.use(autoprefixer())
.use(copy({
'pattern': 'assets/styl/*',
'directory': 'assets/css',
'move': true
}))
.use(md)
.use(permalinks({
pattern: ':title',
relative: 'false'
}))
.use(layouts({
'default': 'default.pug',
'directory': './src/layouts',
'engine': 'pug',
'partials': 'includes',
'pattern': '**/*.html'
}))
.build((err) => {
if (err) {
throw err;
} else {
console.log('The cast is forged!'); // eslint-disable-line
}
});