-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
51 lines (35 loc) · 1.16 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import * as collections from "./src/_config/collections.js";
import * as filters from "./src/_config/filters.js";
import * as plugins from "./src/_config/plugins.js";
console.log("Registered Collections:", Object.keys(collections));
console.log("Registered Filters:", Object.keys(filters));
console.log("Registered Plugins:", Object.keys(plugins));
export default async function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("src/assets");
eleventyConfig.addPassthroughCopy('src/favicon.ico');
// Collections
for (const [name, collectionFn] of Object.entries(collections)) {
eleventyConfig.addCollection(name, collectionFn);
}
// Filers
Object.entries(filters).forEach(([name, filterFunction]) => {
eleventyConfig.addFilter(name, filterFunction);
});
// Functions
// Plugins
Object.entries(plugins).forEach(([name, plugin]) => {
eleventyConfig.addPlugin(plugin);
});
// Watch CSS files for changes
eleventyConfig.setBrowserSyncConfig({
files: './_site/css/**/*.css',
});
return {
dir: {
input: 'src',
output: 'dist'
},
markdownTemplateEngine: 'njk',
htmlTemplateEngine: 'njk'
};
}