From 16994b52c0e32f1015a06ffb4d4f0a86a4bf0abe Mon Sep 17 00:00:00 2001
From: Saftius
Date: Wed, 21 Dec 2022 19:58:46 +0100
Subject: Add resource integrity check to local resources
* See [Hugo Docs on Fingerprinting and SRI](https://gohugo.io/hugo-pipes/fingerprint/)
---
layouts/partials/scripts-end.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'layouts/partials/scripts-end.html')
diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html
index c901e0d..89c242a 100644
--- a/layouts/partials/scripts-end.html
+++ b/layouts/partials/scripts-end.html
@@ -9,8 +9,8 @@
{{ end }}
{{ $options := (dict "targetPath" "assets/js/fuji.min.js" "minify" true "target" "es2015" "format" "iife") }}
-{{ $built := resources.Get "js/fuji.js" | js.Build $options }}
-
+{{ $built := resources.Get "js/fuji.js" | js.Build $options | resources.Fingerprint "sha512" }}
+
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}
--
cgit v1.2.3
From 564ef0171b643743ae5f044d0524785d40d481e9 Mon Sep 17 00:00:00 2001
From: Saftius
Date: Wed, 21 Dec 2022 22:23:48 +0100
Subject: Add integrity check to remote resources
* Generated with [SRI Hash Generator](https://www.srihash.org/)
---
layouts/partials/scripts-end.html | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
(limited to 'layouts/partials/scripts-end.html')
diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html
index 89c242a..e80099b 100644
--- a/layouts/partials/scripts-end.html
+++ b/layouts/partials/scripts-end.html
@@ -1,12 +1,12 @@
{{ if eq .Section "search" }}
-
-
+
+
{{ else if eq .Section "archives" }}
{{ else }}
-
-
-
-
+
+
+
+
{{ end }}
{{ $options := (dict "targetPath" "assets/js/fuji.min.js" "minify" true "target" "es2015" "format" "iife") }}
{{ $built := resources.Get "js/fuji.js" | js.Build $options | resources.Fingerprint "sha512" }}
@@ -15,7 +15,7 @@
{{ partial "math.html" . }}
{{ end }}
{{ with .Params.aplayer }}
-
+