-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
32 lines (27 loc) · 964 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
const eleventyLinkTo = require('eleventy-plugin-link_to');
const eleventySass = require("@grimlink/eleventy-plugin-sass");
const sass = require("sass");
const util = require('util');
module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy('src/assets/images');
eleventyConfig.addPlugin(eleventyLinkTo);
eleventyConfig.addPlugin(eleventySass, { sass, outputPath: 'assets/css' });
eleventyConfig.addShortcode('year', () => new Date().getFullYear().toString());
eleventyConfig.addFilter('console', function(value) {
const str = util.inspect(value);
return `<pre><code>${str}</code></pre>`;
// Usage: {{ inputData | console | safe }}
});
return {
dir: {
input: "src",
includes: "_includes",
data: "_data",
output: "dist"
},
templateFormats: ["html", "njk", "md", "11ty.js"],
htmlTemplateEngine: "njk",
markdownTemplateEngine: "njk",
passthroughFileCopy: true
};
};