summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2021-01-15 23:21:13 +0530
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2021-01-15 23:21:13 +0530
commitad44cdda0f5e18c0c605e80eb6e9818fe112de77 (patch)
tree37334af00d2f4bdf4e4f0010f970d7f55acbdb97
parent18ae4e559314288780c91ee838fd1b2f92e662f7 (diff)
fix highlight.js loading on section pages
-rw-r--r--layouts/partials/footer.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index f5ca45d..276a76a 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -18,7 +18,7 @@
</a>
{{- partial "extend_footer.html" . -}}
{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }}
-{{- if (and (in site.Params.mainSections .Type) (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 }}
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }}
<script defer src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"