From e1f63bffbd927bc76b9b778c1711b818258ed9d1 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Tue, 5 Jul 2022 01:23:29 +0200 Subject: Implement i18n in search --- layouts/partials/scripts.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'layouts/partials/scripts.html') diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 02634ad..1574f7e 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -17,7 +17,10 @@ {{- end -}} -{{- $search := resources.Get "js/search.js" | minify -}} +{{- $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 -}} -- cgit v1.2.3