-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eleventy.js
More file actions
29 lines (28 loc) · 988 Bytes
/
.eleventy.js
File metadata and controls
29 lines (28 loc) · 988 Bytes
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
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
const markdownIt = require("markdown-it");
const markdownItAnchor = require("markdown-it-anchor");
const pluginTOC = require('eleventy-plugin-nesting-toc');
const anchor = require("markdown-it-anchor");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(pluginTOC);
eleventyConfig.addPlugin(syntaxHighlight);
eleventyConfig.addPassthroughCopy("./src/css/");
eleventyConfig.addPassthroughCopy("./src/images/");
eleventyConfig.addPassthroughCopy("./src/rest/");
eleventyConfig.addWatchTarget("./src/css/");
eleventyConfig.addShortcode("year", () => `${new Date().getFullYear()}`);
let markdownLibrary = markdownIt({
html: true,
breaks: true,
linkify: true
}).use(markdownItAnchor, {
permalink: anchor.permalink.headerLink()
});
eleventyConfig.setLibrary("md", markdownLibrary);
return {
dir: {
input: "src",
output: "public",
},
};
};