diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html
index 647511b..c1fbb1f 100644
--- a/layouts/partials/docs/html-head.html
+++ b/layouts/partials/docs/html-head.html
@@ -17,18 +17,18 @@
{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
-
+
{{- if default true .Site.Params.BookSearch -}}
{{- $searchJSFile := printf "%s.search.js" .Language.Lang }}
{{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }}
-
+
{{ end -}}
{{- if .Site.Params.BookServiceWorker -}}
{{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }}
-
+
{{ end -}}
{{- template "_internal/google_analytics_async.html" . -}}
@@ -42,3 +42,9 @@
Made with Book Theme
https://github.com/alex-shpak/hugo-book
{{ "-->" | safeHTML }}
+
+{{- define "integrity" -}}
+ {{- if (urls.Parse .Permalink).Host -}}
+ integrity="{{ .Data.Integrity }}" crossorigin="anonymous"
+ {{- end -}}
+{{- end -}}