forked from AccessibilityNL/accessibility-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
34 lines (28 loc) · 862 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
// Eleventy Settings
const sass = require("eleventy-plugin-sass");
module.exports = function (eleventyConfig) {
// copy assets and style folder
eleventyConfig.addPassthroughCopy("assets");
// compile sass
eleventyConfig.addPlugin(sass, {
watch: ['styles/*.scss', '!node_modules/**'],
autoprefixer: true,
cleanCSS: false
});
// sort levels by index number
// creates 'levels' collection
eleventyConfig.addCollection('levels', function(collectionApi) {
return collectionApi.getFilteredByTag('level').sort(
(a, b) => a.data.index - b.data.index
);
});
return {
dir: {
input: "src",
includes: "/_includes",
layouts: "/_includes/_layouts",
output: "_site",
passthroughFileCopy: true
}
}
};