summaryrefslogtreecommitdiffstats
path: root/layouts/partials/head.html
diff options
context:
space:
mode:
authorSaftius2022-12-21 19:58:46 +0100
committerSaftius2022-12-21 19:58:46 +0100
commit16994b52c0e32f1015a06ffb4d4f0a86a4bf0abe (patch)
treee60ec9a11cd92e88703e9c161d79a2eb912439ac /layouts/partials/head.html
parent22bc4782fe14e031f75e3199f525adbf355fe5ee (diff)
downloadhugo-theme-fuji-16994b52c0e32f1015a06ffb4d4f0a86a4bf0abe.tar.gz
hugo-theme-fuji-16994b52c0e32f1015a06ffb4d4f0a86a4bf0abe.tar.bz2
hugo-theme-fuji-16994b52c0e32f1015a06ffb4d4f0a86a4bf0abe.zip
Add resource integrity check to local resources
* See [Hugo Docs on Fingerprinting and SRI](https://gohugo.io/hugo-pipes/fingerprint/)
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r--layouts/partials/head.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 7dedc44..3dbe2a9 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -34,8 +34,8 @@
<!-- dep -->
{{ partial "styles.html" . }}
{{ $options := (dict "targetPath" "assets/css/fuji.min.css" "outputStyle" "compressed") }}
-{{ $style := resources.Get "scss/fuji.scss" | resources.ToCSS $options }}
-<link rel="stylesheet" href="{{ $style.Permalink }}" />
+{{ $style := resources.Get "scss/fuji.scss" | resources.ToCSS $options | resources.Fingerprint "sha512" }}
+<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" />
{{ with .Site.Params.googleAdsense }}
<script async data-ad-client="ca-pub-{{ . }}" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
{{ end}}