Use better PrismJS themes

This commit is contained in:
Neil Brommer 2023-07-09 21:29:42 -07:00
parent a79f462669
commit 19696fad1d
5 changed files with 25 additions and 7 deletions

View file

@ -8,8 +8,10 @@ module.exports = function (eleventyConfig) {
files: "./_site/css/**/*.css",
});
eleventyConfig.addPassthroughCopy({
"node_modules/prismjs/themes/prism.min.css": "css/prism.min.css",
"node_modules/prismjs/themes/prism-tomorrow.min.css": "css/prism-tomorrow.min.css",
"node_modules/prism-themes/themes/prism-material-light.min.css":
"css/prism-material-light.min.css",
"node_modules/prism-themes/themes/prism-material-oceanic.min.css":
"css/prism-material-oceanic.min.css",
"node_modules/feather-icons/dist/feather-sprite.svg": "images/feather-sprite.svg",
"src/js/site.js": "js/site.js"
});

16
package-lock.json generated
View file

@ -11,7 +11,7 @@
"dependencies": {
"feather-icons": "^4.29.0",
"normalize.css": "^8.0.1",
"prismjs": "^1.29.0"
"prism-themes": "^1.9.0"
},
"devDependencies": {
"@11ty/eleventy": "^2.0.0",
@ -1880,10 +1880,16 @@
"node": ">= 4"
}
},
"node_modules/prism-themes": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/prism-themes/-/prism-themes-1.9.0.tgz",
"integrity": "sha512-tX2AYsehKDw1EORwBps+WhBFKc2kxfoFpQAjxBndbZKr4fRmMkv47XN0BghC/K1qwodB1otbe4oF23vUTFDokw=="
},
"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==",
"dev": true,
"engines": {
"node": ">=6"
}
@ -3836,10 +3842,16 @@
"promise-each": "^2.2.0"
}
},
"prism-themes": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/prism-themes/-/prism-themes-1.9.0.tgz",
"integrity": "sha512-tX2AYsehKDw1EORwBps+WhBFKc2kxfoFpQAjxBndbZKr4fRmMkv47XN0BghC/K1qwodB1otbe4oF23vUTFDokw=="
},
"prismjs": {
"version": "1.29.0",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz",
"integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q=="
"integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==",
"dev": true
},
"promise": {
"version": "7.3.1",

View file

@ -21,6 +21,6 @@
"dependencies": {
"feather-icons": "^4.29.0",
"normalize.css": "^8.0.1",
"prismjs": "^1.29.0"
"prism-themes": "^1.9.0"
}
}

View file

@ -14,8 +14,8 @@
{% endif %}
</title>
<link rel="stylesheet" href="{{ '/css/prism.min.css' }}" media="(prefers-color-scheme: light)">
<link rel="stylesheet" href="{{ '/css/prism-tomorrow.min.css' }}" media="(prefers-color-scheme: dark)">
<link rel="stylesheet" href="{{ '/css/prism-material-light.min.css' }}" media="(prefers-color-scheme: light)">
<link rel="stylesheet" href="{{ '/css/prism-material-oceanic.min.css' }}" media="(prefers-color-scheme: dark)">
<link rel="stylesheet" href="{{ '/css/site.css' | url }}">
</head>
<body>

View file

@ -31,3 +31,7 @@ pre {
border-radius: unset;
}
}
.token.keyword {
font-style: normal;
}