From 3487e9fc1b97511a85d8740daf1a604e70830c06 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Thu, 9 Dec 2021 16:12:30 -0600 Subject: [PATCH] don't bother with a ToC if it's going to be a short one --- layouts/partials/sidebar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 17aa087..22bca7e 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -30,7 +30,7 @@ {{ $r }} {{- end }} {{- end }} - {{ if and (gt .WordCount 400 ) ($s.toc) }} + {{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) ($s.toc) }}

{{ T "overview" }}

{{ .TableOfContents }}