-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eleventy.js
35 lines (28 loc) · 911 Bytes
/
.eleventy.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
const yaml = require("js-yaml");
const markdownIt = require("markdown-it");
module.exports = async function (eleventyConfig) {
const { EleventyHtmlBasePlugin } = await import("@11ty/eleventy");
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
// Copy CSS to production
eleventyConfig.addPassthroughCopy("src/css");
eleventyConfig.addWatchTarget("src/css");
// Copy images to production
eleventyConfig.addPassthroughCopy("src/_img");
eleventyConfig.addWatchTarget("src/_img");
// Yaml support
eleventyConfig.addDataExtension("yaml", contents => yaml.load(contents));
// Copy scripts to production
eleventyConfig.addPassthroughCopy("scripts");
// Add markdownify filter
eleventyConfig.addFilter("markdownify", (content) => {
const md = new markdownIt();
return md.render(content);
});
return {
dir: {
input: "src",
output: "_site"
},
pathPrefix: "/hackathon2025/",
};
};