feat: add syntax highlighting for code blocks
This commit is contained in:
parent
78a1c3d8d2
commit
f5c891910e
@ -1,6 +1,8 @@
|
||||
const blogTools = require("eleventy-plugin-blog-tools");
|
||||
const markdownIt = require("markdown-it");
|
||||
const markdownItAttrs = require("markdown-it-attrs");
|
||||
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
||||
|
||||
|
||||
// Import prior to `module.exports` within `.eleventy.js`
|
||||
const { DateTime } = require("luxon");
|
||||
@ -40,7 +42,7 @@ module.exports = function(eleventyConfig) {
|
||||
});
|
||||
|
||||
eleventyConfig.addPlugin(blogTools);
|
||||
|
||||
eleventyConfig.addPlugin(syntaxHighlight);
|
||||
|
||||
return {
|
||||
passthroughFileCopy: true,
|
||||
|
21
package-lock.json
generated
21
package-lock.json
generated
@ -9,6 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
||||
"a-sync-waterfall": "^1.0.1",
|
||||
"acorn": "^7.4.1",
|
||||
"ansi-regex": "^6.1.0",
|
||||
@ -328,6 +329,18 @@
|
||||
"url": "https://opencollective.com/11ty"
|
||||
}
|
||||
},
|
||||
"node_modules/@11ty/eleventy-plugin-syntaxhighlight": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-syntaxhighlight/-/eleventy-plugin-syntaxhighlight-5.0.0.tgz",
|
||||
"integrity": "sha512-y9BUmP1GofmbJgxM1+ky/UpFCpD8JSOeLeKItUs0WApgnrHk9haHziW7lS86lbArX5SiCVo4zTTw9x53gvRCaA==",
|
||||
"dependencies": {
|
||||
"prismjs": "^1.29.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/11ty"
|
||||
}
|
||||
},
|
||||
"node_modules/@11ty/eleventy-utils": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@11ty/eleventy-utils/-/eleventy-utils-1.0.3.tgz",
|
||||
@ -3654,6 +3667,14 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prismjs": {
|
||||
"version": "1.29.0",
|
||||
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz",
|
||||
"integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/promise": {
|
||||
"version": "7.3.1",
|
||||
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
|
||||
|
@ -27,6 +27,7 @@
|
||||
"url": "https://gitlab.comprofix.com/comprofix/website.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
||||
"a-sync-waterfall": "^1.0.1",
|
||||
"acorn": "^7.4.1",
|
||||
"ansi-regex": "^6.1.0",
|
||||
|
@ -4,6 +4,7 @@
|
||||
<link rel="stylesheet" href="/css/global.css" />
|
||||
<script src="https://kit.fontawesome.com/83f4233a72.js" crossorigin="anonymous"></script>
|
||||
<script src="/js/darkmode.js"></script>
|
||||
<link href="https://unpkg.com/prismjs@1.20.0/themes/prism-okaidia.css" rel="stylesheet" />
|
||||
|
||||
<div class="menu">
|
||||
<ul class="menu>">
|
||||
|
Loading…
Reference in New Issue
Block a user