From 9a043d83abf251511ded0c9e180cf752021b8914 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Mon, 6 Oct 2025 10:20:36 +0800 Subject: [PATCH] fix(single.html): toc not controlled by frontmatter (redo #2428) --- layouts/_default/single.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ad74da4e..25ee02b6 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -31,7 +31,8 @@ {{/* Body */}}
- {{ $enableToc := .Params.showTableOfContents | default (site.Params.list.showTableOfContents | default false) }} + {{ $enableToc := site.Params.article.showTableOfContents | default false }} + {{ $enableToc = .Params.showTableOfContents | default $enableToc }} {{ $showToc := and $enableToc (in .TableOfContents "