From 8bd3e6449b8f09c6f333a8c496d93e90e11a6515 Mon Sep 17 00:00:00 2001 From: karim Date: Mon, 29 Jun 2026 12:03:36 +0200 Subject: [PATCH] fix: guard len images for video-only projects --- layouts/portfolio/single.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/portfolio/single.html b/layouts/portfolio/single.html index 725e024..eead26c 100644 --- a/layouts/portfolio/single.html +++ b/layouts/portfolio/single.html @@ -7,7 +7,7 @@ {{ if or $images $hasText $video }}

$ ls

- {{ $total := len $images }}{{ if $hasText }}{{ $total = add $total 1 }}{{ end }}{{ if $video }}{{ $total = add $total 1 }}{{ end }} + {{ $total := 0 }}{{ if $images }}{{ $total = len $images }}{{ end }}{{ if $hasText }}{{ $total = add $total 1 }}{{ end }}{{ if $video }}{{ $total = add $total 1 }}{{ end }}

total {{ $total }}