From 1f4a06569d36975ef60b0e3e011093235cb3a41d Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sun, 31 Aug 2025 03:14:35 -0500 Subject: [PATCH] WIP? add optional dict to page-list --- layouts/_partials/page-list.html | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/layouts/_partials/page-list.html b/layouts/_partials/page-list.html index a16ca51..6ef8cbb 100644 --- a/layouts/_partials/page-list.html +++ b/layouts/_partials/page-list.html @@ -1,9 +1,18 @@ -
- {{ with . }} +{{ $list := dict }} +{{ $extraclasses := "" }} +{{ with try (index . "list") }} + {{ if .Err }} + {{ $list = $ }} + {{ else }} + {{ $list = .Value }} + {{ $extraclasses = index $ "classes" }} + {{ end }} +{{ end }} + +
+ {{ with $list }} {{ range . }} -
- {{ .Render "summary" }} -
+ {{ .Render "summary" }} {{ end }} {{ else }}