-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eleventy.cjs
42 lines (36 loc) · 1.16 KB
/
.eleventy.cjs
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 syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
const markdownIt = require("markdown-it");
module.exports = function (eleventyConfig) {
const md = new markdownIt({
html: true,
});
eleventyConfig.addPairedShortcode("markdown", (content) => {
return md.render(content);
});
eleventyConfig.addPlugin(syntaxHighlight, {
trim: true,
});
eleventyConfig.addPassthroughCopy("docs-src/assets");
eleventyConfig.addPassthroughCopy({
"node_modules/@webcomponents/webcomponentsjs":
"assets/@webcomponents/webcomponentsjs",
});
eleventyConfig.addPassthroughCopy({
"node_modules/lit/polyfill-support.js": "assets/lit/polyfill-support.js",
});
eleventyConfig.addPassthroughCopy({
"node_modules/prismjs/themes/prism-okaidia.css":
"assets/prismjs/themes/prism-okaidia.css",
});
eleventyConfig.addPassthroughCopy({
"build/color-legend-element.umd.js": "assets/color-legend-element.umd.js",
});
eleventyConfig.addWatchTarget("./docs-src/assets");
eleventyConfig.addWatchTarget("./build/color-legend-element.umd.js");
return {
dir: {
input: "./docs-src",
output: "./docs",
},
};
};