8000 docs: switch to using `hugo.IsProduction` · coreui/coreui@f86bcf7 · GitHub
[go: up one dir, main page]

Skip to content

Commit f86bcf7

Browse files
committed
docs: switch to using hugo.IsProduction
1 parent 636dc4d commit f86bcf7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/layouts/partials/scripts.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ if eq hugo.Environment "production" -}}
1+
{{ if hugo.IsProduction -}}
22
<script src="/dist/js/coreui.bundle.min.js" {{ printf "integrity=%q" .Site.Params.cdn.js_bundle_hash | safeHTMLAttr }}></script>
33
{{ else -}}
44
<script src="/dist/js/coreui.bundle.js"></script>
@@ -13,7 +13,7 @@
1313
{{- $targetDocsJSPath := printf "/assets/js/docs.js" -}}
1414
{{- $docsJs := append $js $vendor | resources.Concat $targetDocsJSPath -}}
1515

16-
{{- if eq hugo.Environment "production" -}}
16+
{{- if hugo.IsProduction -}}
1717
{{- $docsJs = $docsJs | resources.Minify -}}
1818
{{- end }}
1919

docs/layouts/partials/stylesheet.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
33
{{- end }}
44

5-
{{ if eq hugo.Environment "production" -}}
5+
{{ if hugo.IsProduction -}}
66
{{ if eq .Page.Params.direction "rtl" -}}
77
<link href="/dist/css/coreui.rtl.min.css" rel="stylesheet" {{ printf "integrity=%q" .Site.Params.cdn.css_rtl_hash | safeHTMLAttr }}>
88
{{- else -}}
@@ -18,7 +18,7 @@
1818
{{- $sassOptions := dict "targetPath" $targetDocsCssPath "outputStyle" "expanded" "precision" 6 -}}
1919
{{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}}
2020

21-
{{ if eq hugo.Environment "production" -}}
21+
{{ if hugo.IsProduction -}}
2222
{{- $sassOptions = merge $sassOptions (dict "outputStyle" "compressed") -}}
2323
{{- end -}}
2424

0 commit comments

Comments
 (0)
0