-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
35 lines (33 loc) · 1.08 KB
/
.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
34
35
module.exports = function (eleventyConfig) {
// Copy `static` folder into `_site`
eleventyConfig.addPassthroughCopy({ "static/*": "." });
eleventyConfig.addPassthroughCopy({ "static/img": "img" });
eleventyConfig.addPassthroughCopy({ "static/svg": "svg" });
eleventyConfig.addPassthroughCopy({ "build/css": "css" });
eleventyConfig.addPassthroughCopy({ "build/js": "js" });
// Watch CSS and JS files for changes
eleventyConfig.setBrowserSyncConfig({
files: "./_site/css/**/*.css",
});
eleventyConfig.setBrowserSyncConfig({
files: "./_site/js/**/*.js",
});
// custom filters and shortcuts
// IMPORTANT: updates here requires to restart the local server
eleventyConfig.addShortcode("pageTitle", function (title) {
const mainTitle = "Commit Conf 2025";
return title ? `${mainTitle} - ${title}` : mainTitle;
});
eleventyConfig.addFilter("typeof", function (variable) {
if (Array.isArray(variable)) {
return "array";
}
return typeof variable;
});
// Return your Object options:
return {
dir: {
input: "src",
},
};
};