generated from achanda101/11ty-sass-multilevel-responsive-menu-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
24 lines (20 loc) · 853 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
const lazyImagesPlugin = require("eleventy-plugin-lazyimages");
module.exports = function (eleventyConfig) {
eleventyConfig.addWatchTarget("./src/sass/");
eleventyConfig.addPassthroughCopy("./src/img");
eleventyConfig.addPassthroughCopy("./src/utils");
eleventyConfig.addShortcode("youtube", (id) => {
return `<div class="video-wrapper"><iframe src="https://www.youtube.com/embed/${id}" frameborder="0" allowfullscreen allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe></div>`;
});
eleventyConfig.addShortcode("year", () => `${new Date().getFullYear()}`);
eleventyConfig.addPlugin(lazyImagesPlugin, {
imgSelector: "img", // custom image selector
// cacheFile: "", // don't cache results to a file
});
return {
dir: {
input: "src",
output: "public",
},
};
};