mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +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