aboutsummaryrefslogtreecommitdiff
path: root/site/layouts/partials/scripts.html
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2024-03-08 12:41:17 +0200
committerGitHub <[email protected]>2024-03-08 12:41:17 +0200
commit930740afbc87931475df4785c9e13e0818e8af66 (patch)
treefea0dc4651a45aeb1d144302e64c01004f856c0d /site/layouts/partials/scripts.html
parentf545964f8f7446a889b9226d865807d58b7fb8cb (diff)
downloadbootstrap-930740afbc87931475df4785c9e13e0818e8af66.tar.xz
bootstrap-930740afbc87931475df4785c9e13e0818e8af66.zip
Switch to using `hugo.IsProduction` (#39763)
Diffstat (limited to 'site/layouts/partials/scripts.html')
-rw-r--r--site/layouts/partials/scripts.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html
index facb7d384..046f659a9 100644
--- a/site/layouts/partials/scripts.html
+++ b/site/layouts/partials/scripts.html
@@ -1,4 +1,4 @@
-{{ if eq hugo.Environment "production" -}}
+{{ if hugo.IsProduction -}}
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" {{ printf "integrity=%q" .Site.Params.cdn.js_bundle_hash | safeHTMLAttr }}></script>
{{ else -}}
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
@@ -15,7 +15,7 @@
{{- $targetDocsJSPath := path.Join "/docs" .Site.Params.docs_version "assets/js/docs.js" -}}
{{- $docsJs := append $js $vendor | resources.Concat $targetDocsJSPath -}}
-{{- if eq hugo.Environment "production" -}}
+{{- if hugo.IsProduction -}}
{{- $docsJs = $docsJs | resources.Minify -}}
{{- end }}