-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
33 lines (29 loc) · 995 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
module.exports = function (eleventyConfig) {
// Copy these dirs and files to their respective _site dirs
eleventyConfig.addPassthroughCopy("images");
eleventyConfig.addPassthroughCopy("assets");
eleventyConfig.addPassthroughCopy("favicon.ico");
eleventyConfig.addPassthroughCopy("robots.txt");
eleventyConfig.addPassthroughCopy("_redirects");
eleventyConfig.addPassthroughCopy("yandex_16ac9ffcc8cf6f38.html");
// Shortcode for the current year
eleventyConfig.addShortcode("year", () => `${new Date().getFullYear()}`);
// eleventyConfig.addFilter("debugger", (...args) => {
// console.log(...args)
// debugger;
// });
eleventyConfig.addFilter("captionLineBreaks", function (caption) {
return caption.replace(/, -/g, "<br>");
});
return {
markdownTemplateEngine: "njk",
dataTemplateEngine: "njk",
htmlTemplateEngine: "njk",
dir: {
input: "src",
output: "_site",
layouts: "_layouts",
data: "_data",
},
};
};