mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 17:11:48 +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:
@@ -1,5 +1,5 @@
|
||||
{{- "<!-- Bootstrap core CSS -->" | safeHTML }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" -}}
|
||||
{{ if eq hugo.Environment "production" -}}
|
||||
<link href="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.min.css" rel="stylesheet" integrity="{{ .Site.Params.cdn.css_hash }}" crossorigin="anonymous">
|
||||
{{- else -}}
|
||||
<link href="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.css" rel="stylesheet">
|
||||
@@ -10,7 +10,7 @@
|
||||
{{- $sassOptions := dict "targetPath" $targetDocsCssPath "precision" 6 -}}
|
||||
{{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}}
|
||||
|
||||
{{- if (eq (getenv "HUGO_ENV") "production") -}}
|
||||
{{ if eq hugo.Environment "production" -}}
|
||||
{{- $sassOptions = merge $sassOptions (dict "outputStyle" "compressed") -}}
|
||||
{{- end -}}
|
||||
|
||||
|
Reference in New Issue
Block a user