-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
39 lines (29 loc) · 1007 Bytes
/
.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
// Modules
const readableDate = require('./_11ty/date.js');
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
const dotenv = require('dotenv').config()
module.exports = function(eleventyConfig) {
// Layout aliases
eleventyConfig.addLayoutAlias('default', 'layouts/base.njk');
/* Pass through */
eleventyConfig.addPassthroughCopy('src/images')
// Plugins
eleventyConfig.addPlugin(eleventyNavigationPlugin);
// Filters
eleventyConfig.addFilter('date', readableDate)
// ... cssmin
// ... jsmin
// Custom Collections
eleventyConfig.addCollection()
// Custom Shortcodes
// Transforms
if (process.env.NODE_ENV == 'production') {
eleventyConfig.addTransform("htmlmin", require('./_11ty/htmlmin.js') );
}
return {
dir: { input: 'src', output: 'dist', data: '_data' },
passthroughFileCopy: true,
templateFormats: ['njk', 'md', 'css', 'html', 'yml'],
htmlTemplateEngine: 'njk'
}
}