-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
34 lines (29 loc) · 983 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
const pluginRss = require("@11ty/eleventy-plugin-rss");
module.exports = function (eleventyConfig) {
// Copy the css/images/js/data to their respective _site dirs
eleventyConfig.addPassthroughCopy("css");
eleventyConfig.addPassthroughCopy("images");
eleventyConfig.addPassthroughCopy("assets");
eleventyConfig.addPassthroughCopy("js");
eleventyConfig.addPassthroughCopy("robots.txt");
// Shortcode for the current year
eleventyConfig.addShortcode("year", () => `${new Date().getFullYear()}`);
eleventyConfig.addPlugin(pluginRss);
eleventyConfig.addLiquidFilter("dateToRfc3339", pluginRss.dateToRfc3339);
eleventyConfig.addFilter("debugger", (...args) => {
console.log(...args);
debugger;
});
return {
markdownTemplateEngine: "njk",
dataTemplateEngine: "njk",
htmlTemplateEngine: "njk",
dir: {
input: "src",
output: "_site",
includes: "_includes",
layouts: "_layouts",
data: "_data",
},
};
};