diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-09-17 11:56:28 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-09-17 11:56:28 +0530 |
| commit | ebb9eb4043b3a5f1ced0f41a923bb4c5a468ca27 (patch) | |
| tree | a9fb0c53cca06f931b575ef801094c3c751e4801 /layouts | |
| parent | 4ded4a50525d51fdf16c21520e6e235d39f8895d (diff) | |
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
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/partials/footer.html | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ <path d="M12 6H0l6-6z" /></svg> </button> </a> - +{{if in site.Params.mainSections .Type }} {{ $highlight := resources.Get "js/highlight.min.js" | minify | fingerprint}} <script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"></script> +{{end }} <script> window.onload = function () { if (localStorage.getItem("menu-scroll-position")) { |
