Perf: use build-in function hugo.IsProduction

This commit is contained in:
Cell
2022-05-21 12:31:47 +08:00
parent 8a90e43eb8
commit fcf13346af
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -196,7 +196,7 @@
{{- end -}}
{{- /* PWA */ -}}
{{- if eq hugo.Environment "production" -}}
{{- if hugo.IsProduction -}}
{{- $config = dict "enablePWA" .Site.Params.enablePWA | merge $config -}}
{{- end -}}
+1 -1
View File
@@ -21,7 +21,7 @@
{{- $toc = dict "enable" false -}}
{{- end -}}
{{- if eq hugo.Environment "production" -}}
{{- if hugo.IsProduction -}}
{{- $cdn := .Site.Params.cdn -}}
{{- with $cdn.data -}}
{{- $cdnData := printf "data/cdn/%v" . | resources.Get | transform.Unmarshal -}}