Fix #122 due to the change of Go template since Hugo 0.71.1

More detail:
https://discourse.gohugo.io/t/0-71-1-error-cant-give-argument-to-non-function/25928
This commit is contained in:
htr3n 2020-06-05 10:51:19 +10:00
parent 80fe1bf4a9
commit c03d5f48a7

View file

@ -1,4 +1,4 @@
{{ if or ((not (isset .Params "highlight")) and ((isset .Params "highlight") .Params.highlight)) }}
{{ if (isset .Params "highlight") }}
{{ $.Scratch.Set "hl_languages" (union (.Site.Params.highlightjslanguages) (.Params.highlightjslanguages)) }}
{{ if (.Site.Params.highlightjs) }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>