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
This commit is contained in:
Aditya Telange 2022-06-10 21:26:13 +05:30
parent c692695754
commit a94674e6c9
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -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 }}