-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy path.eleventy.js
42 lines (33 loc) · 1.61 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
40
41
42
const pluginTOC = require("eleventy-plugin-nesting-toc");
const { version } = require("../package.json");
const headerPlugin = require("./plugins/header");
const highlightPlugin = require("./plugins/highlight");
const iconPlugin = require("./plugins/icons");
const bannerExamplePlugin = require("./plugins/banner-example");
const tipPlugin = require("./plugins/tip");
const markdownPlugin = require("./plugins/markdown");
module.exports = function(eleventyConfig) {
eleventyConfig.setQuietMode(true); // Reduce the console output
eleventyConfig.addLayoutAlias('home', 'layouts/home.html');
eleventyConfig.addLayoutAlias('page', 'layouts/page.html');
eleventyConfig.addPlugin(bannerExamplePlugin);
eleventyConfig.addPlugin(iconPlugin);
eleventyConfig.addPlugin(headerPlugin);
eleventyConfig.addPlugin(tipPlugin);
// Version shortcode
eleventyConfig.addLiquidShortcode("version", function() {
return {version}.version;
});
eleventyConfig.addPlugin(highlightPlugin);
eleventyConfig.addPlugin(markdownPlugin);
// Add submenu generation
eleventyConfig.addPlugin(pluginTOC, {tags: ['h2', 'h3'], wrapper: 'nav aria-label="Table of contents"', wrapperClass: 'toc s-anchors s-anchors__muted'});
// Copy these files over to _site
eleventyConfig.addPassthroughCopy('assets/dist');
eleventyConfig.addPassthroughCopy('assets/img');
eleventyConfig.addPassthroughCopy('email/templates/code');
eleventyConfig.addPassthroughCopy('email/templates/examples');
// Ignore liquid parsing on these files
eleventyConfig.ignores.add('email/templates/code');
eleventyConfig.ignores.add('email/templates/examples');
}