-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheleventy.config.js
49 lines (40 loc) · 1.61 KB
/
eleventy.config.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import eleventyNavigationPlugin from "@11ty/eleventy-navigation";
import pluginRss from "@11ty/eleventy-plugin-rss";
import { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
export default function (eleventyConfig) {
// passthroughs
eleventyConfig.addPassthroughCopy("robots.txt");
eleventyConfig.addPassthroughCopy("manifest.json");
eleventyConfig.addPassthroughCopy("src/assets/");
eleventyConfig.addPassthroughCopy("src/styles/");
// plugins
eleventyConfig.addPlugin(eleventyNavigationPlugin);
eleventyConfig.addPlugin(pluginRss);
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
extensions: "html", // which file extensions to process
// Add any other Image utility options here:
// optional, output image formats
formats: ["webp", "jpeg"],
// formats: ["auto"],
// optional, output image widths
// widths: ["auto"],
// optional, attributes assigned on <img> override these values.
defaultAttributes: {
loading: "lazy",
decoding: "async",
},
});
// return Object :
return {
markdownTemplateEngine: "njk",
htmlTemplateEngine: "njk",
templateFormats: ["html", "liquid", "njk", "11ty.js"],
dir: {
input: "src",
includes: "templates/includes", // This value is relative to your input directory.
layouts: "templates/layouts", // This value is relative to your input directory.
data: "data", // This value is relative to your input directory.
output: "build"
}
}
}