From ebb9eb4043b3a5f1ced0f41a923bb4c5a468ca27 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Thu, 17 Sep 2020 11:56:28 +0530
Subject: [PATCH] highlightjs : include only on pages with mainSections
* this makes hljs not load on index, taxonomies, archive
pages where code highlighting isn't used
* improving page site load time
---
layouts/partials/footer.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 41c2247..eeffa3e 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -12,9 +12,10 @@
-
+{{if in site.Params.mainSections .Type }}
{{ $highlight := resources.Get "js/highlight.min.js" | minify | fingerprint}}
+{{end }}