footer: hljs: add check to not load hljs on archive and search

This commit is contained in:
Aditya Telange 2020-12-08 00:16:11 +05:30
parent 08e58f5f77
commit db38e156f5
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -14,7 +14,7 @@
<path d="M12 6H0l6-6z" /></svg>
</button>
{{- partial "extend_footer.html" . -}}
{{ if in site.Params.mainSections .Type }}
{{ if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`)) }}
{{- 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.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"