summaryrefslogtreecommitdiffstats
path: root/layouts/partials/scripts.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/scripts.html')
-rw-r--r--layouts/partials/scripts.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index d04bfbe..02634ad 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -1,11 +1,14 @@
{{- $vendors := slice -}}
-{{- $vendorNames := slice "jquery.min" "lunr.min" -}}
+{{- $vendorNames := slice "jquery.js" "lunr.js" -}}
{{- range $vendorNames -}}
- {{ $vendors = $vendors | append (resources.Get (printf "js/vendor/%s.js" .) ) }}
+ {{ $vendors = $vendors | append (resources.Get (printf "js/vendor/%s" .) ) }}
{{- end -}}
-{{- $vendors := $vendors | resources.Concat "js/vendor-bundle.js" | minify -}}
+{{- $vendors = $vendors | resources.Concat "js/vendor-bundle.js" -}}
+{{- if or (eq (getenv "HUGO_ENV") "production") (eq site.Params.env "production") }}
+ {{- $vendors = $vendors | minify -}}
+{{- end -}}
{{- if not site.Params.assets.disable_fingerprinting -}}
{{- $vendors = $vendors | fingerprint -}}