summaryrefslogtreecommitdiff
path: root/layouts/partials/footer.html
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-12-01 18:52:06 +0530
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-12-01 18:52:06 +0530
commita9ff9533a0fb5dcc0b9ab1677cd19e00e9ee0ff9 (patch)
tree8d6c3f19d2132675c7ff46d4b969db751d977ae2 /layouts/partials/footer.html
parent7a0e742def494eee80a9b6fcd069f92b0ce5abac (diff)
head, footer: add option to disable fingerprinting #89
in site config => params: assets: disableFingerprinting: true
Diffstat (limited to 'layouts/partials/footer.html')
-rw-r--r--layouts/partials/footer.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 90cbeec..3af7105 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -17,9 +17,14 @@
</a>
{{- partial "extend_footer.html" . -}}
{{ if in site.Params.mainSections .Type }}
+{{- 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 }}"
onload="hljs.initHighlightingOnLoad();"></script>
+{{- else}}
+{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }}
+<script defer src="{{ $highlight.Permalink }}" onload="hljs.initHighlightingOnLoad();"></script>
+{{- end}}
{{- end }}
<script>
window.onload = function () {