diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-05 01:23:29 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-05 01:23:29 +0200 |
| commit | e1f63bffbd927bc76b9b778c1711b818258ed9d1 (patch) | |
| tree | 8b371a6ff2574eadef3204daedfa2a15f40baeeb /layouts/partials/scripts.html | |
| parent | 0536ba40495ed314aa74cf33317ec486eb2841e6 (diff) | |
| download | gohugo-theme-ed-e1f63bffbd927bc76b9b778c1711b818258ed9d1.tar.gz | |
Implement i18n in search
Diffstat (limited to 'layouts/partials/scripts.html')
| -rw-r--r-- | layouts/partials/scripts.html | 5 |
1 files changed, 4 insertions, 1 deletions
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 @@ <script src="{{ $vendors.RelPermalink }}"></script> {{- 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 -}} <script src="{{ $search.RelPermalink }}" integrity="{{ $search.Data.Integrity }}"></script> |
