From bdb83a4629f26c26b666798ea1fd13db459e1a2c Mon Sep 17 00:00:00 2001 From: nodejh Date: Fri, 24 Mar 2017 18:19:02 +0800 Subject: [PATCH] fix bug: table of content: if no content, not show toc --- layouts/_default/single.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5ada5af..4dab288 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -27,9 +27,11 @@ -
- {{ .TableOfContents }} -
+ {{ if .TableOfContents }} +
+ {{ .TableOfContents }} +
+ {{ end }}
{{ .Content }}