generated from nhoizey/pack11ty
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheleventy.config.js
42 lines (33 loc) · 994 Bytes
/
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
import path from "node:path";
import eleventyPluginPack11ty from "eleventy-plugin-pack11ty";
const isProd = process.env.ELEVENTY_RUN_MODE === "build";
export default async function (eleventyConfig) {
const { responsiverConfig } = await import(
path.join(import.meta.dirname, "src/_11ty/images-responsiver-config.js")
);
const pack11tyPluginOptions = {
responsiver: isProd && responsiverConfig,
minifyHtml: isProd,
markdown: {
firstLevel: 2,
containers: ["info", "success", "warning", "error"],
},
};
eleventyConfig.addPlugin(eleventyPluginPack11ty, pack11tyPluginOptions);
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",
},
};
}