From c362f4a488b6ad85e8f3cb4902ec0f26f2ca3a29 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:21:30 +0800 Subject: [PATCH] style(list.html): add proper code comments --- layouts/_default/list.html | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 117c8045..c6a50e77 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,5 +1,9 @@ {{ define "main" }} {{ .Scratch.Set "scope" "list" }} + {{ $enableToc := .Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false) }} + {{ $showToc := and $enableToc (in .TableOfContents "