-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eleventy.js
33 lines (25 loc) · 900 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
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
module.exports = function(eleventyConfig) {
const markdownIt = require("markdown-it");
const markdownItAnchor = require("markdown-it-anchor");
const markdownLib = markdownIt({ html: true }).use(markdownItAnchor);
eleventyConfig.setLibrary("md", markdownLib);
eleventyConfig.addPlugin(syntaxHighlight, {
templateFormats: ["*"]
});
eleventyConfig.addFilter('date', function (date, dateFormat) {
return format(date, dateFormat)
})
eleventyConfig.addPassthroughCopy("src/img");
eleventyConfig.addPassthroughCopy("src/dist");
eleventyConfig.addPassthroughCopy("src/js");
eleventyConfig.addPassthroughCopy("src/prism");
eleventyConfig.addPassthroughCopy({"src/favicon": "/"});
return {
dir: {
input: "src",
output: "docs"
},
pathPrefix: "/codebase-4/"
};
}