Skip to content

Commit b48f80d

Browse files
committed
[infra] add eleventy syntax highlighting
1 parent 179cb56 commit b48f80d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

site/.eleventy.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
const markdownIt = require('markdown-it');
22
const htmlminifier = require('html-minifier');
3+
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
34

45
module.exports = function(eleventyConfig) {
6+
eleventyConfig.addPlugin(syntaxHighlight, {
7+
templateFormants: ["md", "js", "html"]
8+
});
59
eleventyConfig.addPassthroughCopy("src/assets");
610
eleventyConfig.addPassthroughCopy("src/styles");
711
eleventyConfig.addPassthroughCopy("src/script.js");

site/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
},
1313
"license": "Apache-2.0",
1414
"dependencies": {
15+
"@11ty/eleventy-plugin-syntaxhighlight": "^3.0.1",
1516
"html-minifier": "^4.0.0"
1617
}
17-
}
18+
}

0 commit comments

Comments
 (0)