-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eleventy.js
37 lines (33 loc) · 1.49 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
const slugify = require("slugify");
const filesMinifier = require("./_utilities/filesMinifier");
const generateSlug = require('./_utilities/markdownSlug');
const dateFilter = require("./_utilities/dateFilter");
const urlEncode = require("./_utilities/urlEncode");
const postsCollection = require("./_utilities/postsCollection");
const tagsListCollection = require("./_utilities/tagsListCollection");
const filterByTag = require("./_utilities/filterByTag");
const imageShortcode = require("./_utilities/imageShortcode");
const getIcons = require("./_utilities/getIcons");
module.exports = function (eleventyConfig) {
filesMinifier(eleventyConfig);
generateSlug(eleventyConfig, slugify);
eleventyConfig.addFilter("date", dateFilter);
eleventyConfig.addFilter("urlEncode", urlEncode);
eleventyConfig.addCollection("posts", postsCollection);
eleventyConfig.addCollection("tagsList", tagsListCollection);
eleventyConfig.addFilter("filterByTag", filterByTag);
eleventyConfig.addLiquidShortcode("image", imageShortcode);
getIcons(eleventyConfig);
eleventyConfig.addPassthroughCopy({
"src/public": "/",
"node_modules/beercss/dist/cdn/beer.min.css": "/modules/beercss/beer.min.css",
"node_modules/beercss/dist/cdn/beer.min.js": "/modules/beercss/beer.min.js",
"node_modules/material-dynamic-colors/dist/cdn/material-dynamic-colors.min.js": "/modules/material-dynamic-colors/material-dynamic-colors.min.js",
});
return {
dir: {
input: "src",
output: "_site",
},
};
};