-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy patheleventy.config.js
More file actions
46 lines (36 loc) · 1.11 KB
/
eleventy.config.js
File metadata and controls
46 lines (36 loc) · 1.11 KB
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
import path from "node:path";
import eleventyPluginPack11ty from "eleventy-plugin-pack11ty";
const isProd = process.env.ELEVENTY_RUN_MODE === "build";
export default async function (eleventyConfig) {
// ------------------------------------------------------------------------
// Plugins
// ------------------------------------------------------------------------
const { responsiverConfig } = await import(
path.join(import.meta.dirname, "src/_11ty/images-responsiver-config.js")
);
const pack11tyConfig = {
responsiver: isProd && responsiverConfig,
minifyHtml: isProd,
markdown: {
firstLevel: 2,
containers: ["success", "warning", "error"],
},
};
eleventyConfig.addPlugin(eleventyPluginPack11ty, pack11tyConfig);
eleventyConfig.setDataDeepMerge(true);
eleventyConfig.setQuietMode(true);
eleventyConfig.setWatchJavaScriptDependencies(false);
return {
templateFormats: ["md", "njk"],
markdownTemplateEngine: "njk",
htmlTemplateEngine: "njk",
dataTemplateEngine: "njk",
dir: {
output: "_site",
input: "src",
includes: "_includes",
layouts: "_layouts",
data: "_data",
},
};
}