From 42fa69c15d3b83fff65af8b4895ad96ab86faa72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Mon, 1 Sep 2025 14:25:53 +0300 Subject: [PATCH] toc-show.html: enforce default value true for .Site.Params.BookToc (#755) --- layouts/_partials/docs/toc-show.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/layouts/_partials/docs/toc-show.html b/layouts/_partials/docs/toc-show.html index 21122a1..0b9f932 100644 --- a/layouts/_partials/docs/toc-show.html +++ b/layouts/_partials/docs/toc-show.html @@ -1,5 +1,4 @@ -{{ return default true ( - and - (default .Site.Params.BookToC .Params.BookToC) +{{ return and + (default .Site.Params.BookToC .Params.BookToC | default true) (not (eq .TableOfContents "")) -) }} \ No newline at end of file +}} \ No newline at end of file