diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b6587633b..c0d7ca332 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -67,5 +67,7 @@ {{ partial "layouts/in-this-section.html" . }} {{ end }} {{ $related }} - {{ $toc }} + {{ if $.Store.Get "hasToc" }} + {{ $toc }} + {{ end }} {{ end }} diff --git a/layouts/partials/layouts/toc.html b/layouts/partials/layouts/toc.html index 1a08156c1..04b3116de 100644 --- a/layouts/partials/layouts/toc.html +++ b/layouts/partials/layouts/toc.html @@ -1,5 +1,4 @@ {{ with .Fragments.Headings }} - {{ $.Store.Set "hasToc" true }}