From 10d8d2ed95d62945ab519d663256542b10ea6e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 19 Nov 2022 12:30:11 +0100 Subject: [PATCH] theme: build breaks sites without "output" section in config #396 --- layouts/partials/get-format.hugo | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/layouts/partials/get-format.hugo b/layouts/partials/get-format.hugo index f090146d93..c8a0763e05 100644 --- a/layouts/partials/get-format.hugo +++ b/layouts/partials/get-format.hugo @@ -34,12 +34,10 @@ except the current one. */}} {{- end }} {{- $current := "default" }} {{/* If any alternate output formats part of the "concerned" ones have been found, we range on them. */}} -{{- with $alt }} - {{- range $outputs }} - {{/* If the output format is not listed as an "alternate", it means it is the current one. */}} - {{- if not (in $alt .) }} - {{- $current = . }} - {{- end }} +{{- range $outputs }} + {{/* If the output format is not listed as an "alternate", it means it is the current one. */}} + {{- if not (in $alt .) }} + {{- $current = . }} {{- end }} {{- end }}