-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
32 lines (27 loc) · 945 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
const pluginDate = require("eleventy-plugin-date");
module.exports = function (eleventyConfig) {
// add text filter plugin from npm
eleventyConfig.addPlugin(pluginDate);
// netlify CMS management
eleventyConfig.addPassthroughCopy("admin");
// image assets
eleventyConfig.addPassthroughCopy("assets");
// top level links access
eleventyConfig.addPassthroughCopy({ "assets/tld-links": "." });
// add animation features
eleventyConfig.addPassthroughCopy({
"node_modules/sal.js/dist/sal.js": "assets/scripts/sal.js",
"node_modules/sal.js/dist/sal.css": "assets/styles/sal.css",
});
// Filter source file names using a glob
eleventyConfig.addCollection("Blog", function (collectionApi) {
return collectionApi.getFilteredByGlob("blog/**");
});
return {
dir: {
// ⚠️ These values are both relative to your input directory.
includes: "assets",
layouts: "_layouts",
},
};
};