File tree 4 files changed +6
-7
lines changed
4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 158
158
159
159
{{ .Content }}
160
160
161
- {{- if eq hugo.Environment "production" -}}
161
+ {{- if hugo.IsProduction -}}
162
162
< script src ="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js " {{ printf "integrity=%q " .Site.Params.cdn.js_bundle_hash | safeHTMLAttr }}> </ script >
163
163
{{- else -}}
164
164
< script src ="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js "> </ script >
Original file line number Diff line number Diff line change 1
- {{ if eq hugo.Environment "production" -}}
1
+ {{ if hugo.IsProduction -}}
2
2
< script src ="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js " {{ printf "integrity=%q " .Site.Params.cdn.js_bundle_hash | safeHTMLAttr }}> </ script >
3
3
{{ else -}}
4
4
< script src ="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js "> </ script >
15
15
{{- $targetDocsJSPath := path.Join "/docs" .Site.Params.docs_version "assets/js/docs.js" -}}
16
16
{{- $docsJs := append $js $vendor | resources.Concat $targetDocsJSPath -}}
17
17
18
- {{- if eq hugo.Environment "production" -}}
18
+ {{- if hugo.IsProduction -}}
19
19
{{- $docsJs = $docsJs | resources.Minify -}}
20
20
{{- end }}
21
21
Original file line number Diff line number Diff line change 1
1
< link rel ="stylesheet " href ="https://cdn.jsdelivr.net/npm/@docsearch/css@3 ">
2
2
3
- {{ if eq hugo.Environment "production" -}}
3
+ {{ if hugo.IsProduction -}}
4
4
{{ if eq .Page.Params.direction "rtl" -}}
5
5
< link href ="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.rtl.min.css " rel ="stylesheet " {{ printf "integrity=%q " .Site.Params.cdn.css_rtl_hash | safeHTMLAttr }}>
6
6
{{- else -}}
15
15
{{- $sassOptions := dict "targetPath" $targetDocsCssPath "outputStyle" "expanded" "precision" 6 -}}
16
16
{{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}}
17
17
18
- {{ if eq hugo.Environment "production" -}}
18
+ {{ if hugo.IsProduction -}}
19
19
{{- $sassOptions = merge $sassOptions (dict "outputStyle" "compressed") -}}
20
20
{{- end -}}
21
21
Original file line number Diff line number Diff line change 1
1
# www.robotstxt.org
2
2
3
- {{- $isProduction := eq hugo .Environment "production " - }}
4
3
{{- $isNetlify := eq (getenv "NETLIFY ") "true " - }}
5
- {{- $allowCrawling := and (not $isNetlify ) $ isProduction - }}
4
+ {{- $allowCrawling := and (not $isNetlify ) hugo . IsProduction - }}
6
5
7
6
{{ if $allowCrawling }}
8
7
# Allow crawling of all content
You can’t perform that action at this time.
0 commit comments