-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
43 lines (34 loc) · 1023 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
34
35
36
37
38
39
40
41
42
43
const { shuffle } = require("./src/_utility/shuffle.js");
module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("./src/style");
eleventyConfig.addPassthroughCopy("./src/assets");
eleventyConfig.addPassthroughCopy("./src/js");
// eleventyConfig.addNunjucksShortcode("slider", function(currentImage, imageList) {
// });
//collections
// tags
// images
// roll albums
// tag albums
// eleventyConfig.addCollection("keywords", function (collection) {
// //console.log(collection.getAll());
// return collection.getAll().filter((post) => {
// return "keywords" in post.data;
// });
// });
eleventyConfig.addFilter("shuffle", function (array) {
return shuffle(array);
});
eleventyConfig.addFilter("limit", function (array, limit) {
return array.slice(0, limit);
});
eleventyConfig.addFilter("typeof", function (object) {
return typeof object;
});
return {
dir: {
input: "src",
output: "public",
},
};
};