From 756c9bc45f0732db6e0ca553c82bc378aab30dee Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Wed, 6 Jul 2022 01:33:06 +0200 Subject: Remove jQuery dependency from search form --- layouts/partials/scripts.html | 11 ----------- layouts/shortcodes/form-search.html | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'layouts') diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index ace6e45..e931587 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -24,17 +24,6 @@ {{- end -}} -{{- $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 -}} - -{{- else -}} - -{{- end -}} - {{- if or (eq (getenv "HUGO_ENV") "production") (eq site.Params.env "production") }} {{- with site.GoogleAnalytics -}} {{- $ga := resources.Get "js/ga.js" | minify -}} 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 @@ {{- 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 -}} + +{{- else -}} + +{{- end -}} -- cgit v1.2.3