mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-22 02:21:37 +01:00
Join lines in head for hljs assets (#360)
Fixes errors in lower hugo versions Error: add site dependencies: load resources: loading templates: "site/themes/hugo-PaperMod/layouts/partials/head.html:79:1": parse failed: template: partials/head.html:79: unexpected unclosed action in command
This commit is contained in:
parent
a015ec2efc
commit
c3634e6ccd
@ -76,8 +76,7 @@
|
|||||||
{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }}
|
{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }}
|
||||||
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }}
|
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }}
|
||||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||||
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify |
|
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }}
|
||||||
fingerprint }}
|
|
||||||
<script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"
|
<script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"
|
||||||
onload="hljs.initHighlightingOnLoad();"></script>
|
onload="hljs.initHighlightingOnLoad();"></script>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
Loading…
Reference in New Issue
Block a user