-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eleventy.js
39 lines (32 loc) · 1.21 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
const pluginRss = require("@11ty/eleventy-plugin-rss");
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
const { htmlMinifier } = require("./eleventy/transforms");
const registerShortcodes = require("./eleventy/shortcodes");
const registerCollections = require("./eleventy/collections");
const registerFilters = require("./eleventy/filters");
module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy({
images: "_images",
html: "_html",
"images/favicon": "/",
});
eleventyConfig.addPlugin(syntaxHighlight);
eleventyConfig.addPlugin(pluginRss);
eleventyConfig.setUseGitIgnore(false);
eleventyConfig.setWatchThrottleWaitTime(1000);
eleventyConfig.addTransform("htmlMinifier", htmlMinifier);
registerShortcodes(eleventyConfig);
registerCollections(eleventyConfig);
registerFilters(eleventyConfig);
["page", "post", "anna", "cocktail", "slideshow"].forEach((layout) => {
eleventyConfig.addLayoutAlias(layout, `layouts/${layout}.njk`);
});
return {
dir: {
input: "input",
output: "_dist",
},
templateFormats: ["md", "html", "txt", "htaccess", "pdf", "toml", "njk", "webmanifest"],
passthroughFileCopy: true,
};
};