Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/layouts/_default/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@

{{ .Content }}

{{- 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>
Expand Down
4 changes: 2 additions & 2 deletions site/layouts/partials/scripts.html
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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 }}

Expand Down
4 changes: 2 additions & 2 deletions site/layouts/partials/stylesheet.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">

{{ if eq hugo.Environment "production" -}}
{{ if hugo.IsProduction -}}
{{ if eq .Page.Params.direction "rtl" -}}
<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 }}>
{{- else -}}
Expand All @@ -15,7 +15,7 @@
{{- $sassOptions := dict "targetPath" $targetDocsCssPath "outputStyle" "expanded" "precision" 6 -}}
{{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}}

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

Expand Down
3 changes: 1 addition & 2 deletions site/layouts/robots.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# www.robotstxt.org

{{- $isProduction := eq hugo.Environment "production" -}}
{{- $isNetlify := eq (getenv "NETLIFY") "true" -}}
{{- $allowCrawling := and (not $isNetlify) $isProduction -}}
{{- $allowCrawling := and (not $isNetlify) hugo.IsProduction -}}

{{ if $allowCrawling }}
# Allow crawling of all content
Expand Down