-
Notifications
You must be signed in to change notification settings - Fork 2
/
eleventy.config.js
49 lines (41 loc) · 1.16 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
// @ts-check
const fs = require("node:fs");
process.on("unhandledRejection", (err) => {
console.log(err);
});
/**
* @type {(eleventyConfig: import("@11ty/eleventy/src/UserConfig")) => Partial<ReturnType<import("@11ty/eleventy/src/defaultConfig")>>}
*/
module.exports = (eleventyConfig) => {
eleventyConfig.addPlugin(require("./config"));
eleventyConfig.addPlugin(require("@quasibit/eleventy-plugin-sitemap"), {
sitemap: {
hostname: "https://brownband.org",
},
});
// ignore the book page
eleventyConfig.ignores.add("pages/scripts/book.jsx");
/**
* Data
*/
// set the default layout
eleventyConfig.addGlobalData("layout", "page.jsx");
/**
* Assets
*/
eleventyConfig.addPassthroughCopy({ "assets/root": "/" });
// disable printing each page as it is converted (since there are a lot of them)
eleventyConfig.setQuietMode(!process.env.CI);
return {
markdownTemplateEngine: "njk",
htmlTemplateEngine: "njk",
// configures the locations of various directories
dir: {
input: "pages",
includes: "../includes",
layouts: "../layouts",
data: "../data",
output: "public",
},
};
};