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