summaryrefslogtreecommitdiffstats
path: root/layouts/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/form-search.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/layouts/shortcodes/form-search.html b/layouts/shortcodes/form-search.html
index cb30d6f..614ec35 100644
--- a/layouts/shortcodes/form-search.html
+++ b/layouts/shortcodes/form-search.html
@@ -18,3 +18,14 @@
</div>
{{- partial "search-results" . -}}
+
+{{- $search := resources.Get "js/search.js" -}}
+{{- if or (eq (getenv "HUGO_ENV") "production") (eq site.Params.env "production") }}
+ {{- $search = $search | minify -}}
+{{- end -}}
+{{- if not site.Params.assets.disable_fingerprinting -}}
+ {{- $search = $search | fingerprint -}}
+ <script src="{{ $search.RelPermalink }}" integrity="{{ $search.Data.Integrity }}"></script>
+{{- else -}}
+ <script src="{{ $search.RelPermalink }}"></script>
+{{- end -}}