From 509dafb90637024306a19e9254ba44f2fc225093 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 11 Aug 2022 08:02:10 -0400 Subject: [PATCH] Display non-empty page TOC (#1147) --- layouts/partials/toc.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index fa5c69b460..36185b799a 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -1,7 +1,9 @@ -{{ if not .Params.notoc }} -{{ with .TableOfContents }} -{{ if ge (len .) 200 }} -
{{ . }}
-{{ end }} -{{ end }} -{{ end }} \ No newline at end of file +{{ if not .Params.notoc -}} + {{ with .TableOfContents -}} + {{ if ne . `` -}} +
+ {{ . }} +
+ {{ end -}} + {{ end -}} +{{ end -}}