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
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@
<path d="M12 6H0l6-6z" /></svg> <path d="M12 6H0l6-6z" /></svg>
</button> </button>
{{- partial "extend_footer.html" . -}} {{- 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 }} {{- if not .Site.Params.assets.disableFingerprinting }}
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} {{- $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 }}" <script defer src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"