From c8265de81335a10ac15dded9e2229083d36e6b10 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Wed, 16 Jul 2025 14:51:34 +0800 Subject: [PATCH] refactor(list.html): use intermediate variable for complex condition --- layouts/_default/list.html | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a6df0714..117c8045 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,7 +9,8 @@ {{ end }} {{- end -}} - {{ $toc := and (.Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false)) (in .TableOfContents "