-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
39 lines (36 loc) · 1.08 KB
/
.eleventy.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
module.exports = function(config) {
config.addPassthroughCopy('src/meetup/*/images/*');
config.addPassthroughCopy('src/meetup/a11y/*/images/*');
config.addPassthroughCopy('src/class/*/images/*');
config.addFilter('htmlmin', function(value) {
let htmlmin = require('html-minifier');
return htmlmin.minify(
value, {
removeComments: true,
collapseWhitespace: true
}
);
});
config.addTransform('xmlmin', function(content, outputPath) {
if(outputPath && outputPath.endsWith('.xml')) {
let prettydata = require('pretty-data');
return prettydata.pd.xmlmin(content);
}
return content;
});
return {
dir: {
input: 'src',
output: 'dist',
includes: 'includes',
layouts: 'layouts'
},
dataTemplateEngine: 'njk',
markdownTemplateEngine: 'njk',
htmlTemplateEngine: 'njk',
passthroughFileCopy: true,
templateFormats: [
'md'
],
};
};