Don't consider page-variable to disable HLJS while generating assets

- may lead to generating multiple bundles
This commit is contained in:
Aditya Telange 2021-03-28 09:52:14 +05:30
parent 0c0c6847e5
commit fb4988cfb6
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@
{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} {{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }}
{{- /* include `an-old-hope` if hljs is on */}} {{- /* include `an-old-hope` if hljs is on */}}
{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) | default false }} {{- $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) (" " | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }}
{{- /* order is important */}} {{- /* order is important */}}