-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eleventy.js
More file actions
35 lines (26 loc) · 808 Bytes
/
.eleventy.js
File metadata and controls
35 lines (26 loc) · 808 Bytes
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
// Configuration settings for Eleventy.
// (The SSG which generates this site)
// More info: https://www.11ty.io
const CleanCSS = require('clean-css');
const syntaxHighlightPlugin = require('@11ty/eleventy-plugin-syntaxhighlight');
module.exports = function(eleventyConfig) {
// add a filter to minify our css for inlining
eleventyConfig.addFilter('cssmin', function(code) {
return new CleanCSS({}).minify(code).styles;
});
// syntax highlighting plugin
eleventyConfig.addPlugin(syntaxHighlightPlugin, {
templateFormats: ['md', 'njk']
});
// static passthroughs
eleventyConfig.addPassthroughCopy('src/images');
// other config settings
return {
dir: {
input: 'src',
output: 'dist',
data: 'data'
},
passthroughFileCopy: true
};
};