mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-25 14:30:46 +02:00
Use hugo.Environment
instead of getenv
(#29240)
This is set automatically to "development" when the local server is running, and to "production" when Hugo builds the site.
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
{{ .Content }}
|
||||
|
||||
{{ if ne .Page.Params.include_js false -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" -}}
|
||||
{{- if eq hugo.Environment "production" -}}
|
||||
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ .Site.Params.cdn.js_bundle_hash }}" crossorigin="anonymous"></script>
|
||||
{{- else -}}
|
||||
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
|
||||
|
Reference in New Issue
Block a user