-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eleventy.js
36 lines (29 loc) · 1.25 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
module.exports = (config) => {
config.setDataDeepMerge(true);
config.addPassthroughCopy('src/assets/img/');
config.addPassthroughCopy({ 'src/posts/img/': 'assets/img/' });
config.addPassthroughCopy({ 'src/work/img/': 'assets/img/' });
config.addPassthroughCopy('src/assets/files/');
config.addWatchTarget("src/assets/js/");
config.addWatchTarget("src/assets/css/");
config.addLayoutAlias('default', 'layouts/default.njk');
config.addLayoutAlias('post', 'layouts/post.njk');
config.addLayoutAlias('work', 'layouts/work.njk');
config.addFilter('readableDate', require('./lib/filters/readableDate'));
config.addFilter('minifyJs', require('./lib/filters/minifyJs'));
config.addTransform('postcss', require('./lib/transforms/postcss'));
config.addTransform('minifyHtml', require('./lib/transforms/minifyHtml'));
config.addCollection('posts', require('./lib/collections/posts'));
config.addCollection('work', require('./lib/collections/work'));
config.addCollection('pagedPosts', require('./lib/collections/pagedPosts'));
return {
dir: {
input: 'src',
output: 'dist'
},
// pathPrefix: "/subfolder/",
templateFormats: ['md', 'njk', 'html'],
dataTemplateEngine: 'njk',
markdownTemplateEngine: 'njk'
};
};