blob: b0ad1b06afe78c10dd684df2ab62f583d58ed929 (
plain) (
blame)
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
|
import { getTimestamp } from "./util/timestamp";
import BuildInfo from "../config.json";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export default function (eleventyConfig: any) {
eleventyConfig.addPassthroughCopy({
"./src/static/": "/",
});
// hook in configured build time for GH action to update
eleventyConfig.addGlobalData("buildTimeEncoded", () => {
return getTimestamp(Number(BuildInfo.version));
});
// ensure eleventy marks this config as watched, since it's typescript
eleventyConfig.addWatchTarget("./src/config.ts");
return {
templateFormats: ["njk", "html"],
htmlTemplateEngine: "njk",
dir: {
input: "src/pages",
includes: "../templates",
output: "public",
},
};
}
|