From a94674e6c9c7f0902b2cfeccd3016c623e3d2fbb Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 10 Jun 2022 21:26:13 +0530 Subject: [PATCH] Include chroma fix code when hljs is disabled provided: pygmentsUseClasses: true & markup.highlight.noClasses: false https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma --- layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 770bdaa..7d73b78 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -54,7 +54,7 @@ {{- /* include `an-old-hope` if hljs is on */}} {{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default false) }} -{{- $hljs := (cond ($isHLJSdisabled) (" " | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }} +{{- $hljs := (cond ($isHLJSdisabled) (".chroma { background-color: unset !important;}" | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }} {{- /* order is important */}} {{- $core := (slice $theme_vars $reset $common $hljs $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }}