add syntax highlighting
This commit is contained in:
parent
153595ba29
commit
ccec849b21
4 changed files with 33 additions and 1 deletions
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
module.exports = function(eleventyConfig) {
|
||||
// Define global variables
|
||||
const config = {
|
||||
"config" : {
|
||||
// "base_url": "kittygirl.online",
|
||||
|
|
@ -14,7 +16,11 @@ module.exports = function(eleventyConfig) {
|
|||
eleventyConfig.addGlobalData(item, config[item]);
|
||||
}
|
||||
|
||||
// Code Syntax Highlighting Plugin
|
||||
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
||||
eleventyConfig.addPlugin(syntaxHighlight);
|
||||
|
||||
// Nice Date / Time Display
|
||||
var nunjucksDate = require("nunjucks-date");
|
||||
// http://momentjs.com/docs/#/displaying/format/
|
||||
nunjucksDate.setDefaultFormat("DD.MM.YYYY");
|
||||
|
|
|
|||
23
package-lock.json
generated
23
package-lock.json
generated
|
|
@ -9,6 +9,7 @@
|
|||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
||||
"nunjucks-date": "^1.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
@ -173,6 +174,19 @@
|
|||
"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==",
|
||||
"license": "MIT",
|
||||
"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",
|
||||
|
|
@ -1828,6 +1842,15 @@
|
|||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/prismjs": {
|
||||
"version": "1.30.0",
|
||||
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz",
|
||||
"integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/promise": {
|
||||
"version": "7.3.1",
|
||||
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
"@11ty/eleventy": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
||||
"nunjucks-date": "^1.5.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
@import url(./light.css);
|
||||
@import url(./dark.css);
|
||||
@import url(./darkmode-toggle.css);
|
||||
|
||||
@import url(./prismjs-themes/prism-one-dark.css);
|
||||
Loading…
Add table
Reference in a new issue