theme: build breaks sites without "output" section in config #396

This commit is contained in:
Sören Weber 2022-11-19 12:30:11 +01:00
parent a5be88220b
commit 10d8d2ed95
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -34,13 +34,11 @@ except the current one. */}}
{{- end }} {{- end }}
{{- $current := "default" }} {{- $current := "default" }}
{{/* If any alternate output formats part of the "concerned" ones have been found, we range on them. */}} {{/* If any alternate output formats part of the "concerned" ones have been found, we range on them. */}}
{{- with $alt }} {{- range $outputs }}
{{- range $outputs }}
{{/* If the output format is not listed as an "alternate", it means it is the current one. */}} {{/* If the output format is not listed as an "alternate", it means it is the current one. */}}
{{- if not (in $alt .) }} {{- if not (in $alt .) }}
{{- $current = . }} {{- $current = . }}
{{- end }} {{- end }}
{{- end }}
{{- end }} {{- end }}
{{- return .OutputFormats.Get $current }} {{- return .OutputFormats.Get $current }}