diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 2656c6d..588d180 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -1,8 +1,11 @@ -{{ $toc := and ($.Site.Params.toc) (ge .WordCount $.Site.Params.tocWordCount) }} +{{ $toc := true }} {{ if isset .Params "toc" }} {{ $toc = .Params.toc }} {{ else }} - {{ $toc = true }} + {{ $toc = ge .WordCount .Site.Params.tocWordCount }} + {{ if and (isset .Site.Params "toc") (not (.Site.Params.toc)) }} + {{ $toc = false }} + {{ end }} {{ end }}