From 19696fad1dba6533c3fba73fc0b8bd726b0e702d Mon Sep 17 00:00:00 2001 From: Neil Brommer Date: Sun, 9 Jul 2023 21:29:42 -0700 Subject: [PATCH] Use better PrismJS themes --- .eleventy.js | 6 ++++-- package-lock.json | 16 ++++++++++++++-- package.json | 2 +- src/_includes/layouts/layout.njk | 4 ++-- src/css/Components/_code.scss | 4 ++++ 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index fd5dcc7..2817608 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -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" }); diff --git a/package-lock.json b/package-lock.json index 3978504..66a750f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index eab8516..7299cc6 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,6 @@ "dependencies": { "feather-icons": "^4.29.0", "normalize.css": "^8.0.1", - "prismjs": "^1.29.0" + "prism-themes": "^1.9.0" } } diff --git a/src/_includes/layouts/layout.njk b/src/_includes/layouts/layout.njk index 84ae78e..1ccbf01 100644 --- a/src/_includes/layouts/layout.njk +++ b/src/_includes/layouts/layout.njk @@ -14,8 +14,8 @@ {% endif %} - - + + diff --git a/src/css/Components/_code.scss b/src/css/Components/_code.scss index 35d12fb..1bd0c9c 100644 --- a/src/css/Components/_code.scss +++ b/src/css/Components/_code.scss @@ -31,3 +31,7 @@ pre { border-radius: unset; } } + +.token.keyword { + font-style: normal; +}