From 7484d058f201af669cf1ae71900f71eda90166a0 Mon Sep 17 00:00:00 2001 From: Philip Mallegol-Hansen Date: Tue, 30 Apr 2024 22:46:39 -0700 Subject: [PATCH] Corrects logic for enabling ToC --- layouts/partials/toc.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 2656c6d..3d148a2 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -1,9 +1,8 @@ -{{ $toc := and ($.Site.Params.toc) (ge .WordCount $.Site.Params.tocWordCount) }} -{{ if isset .Params "toc" }} - {{ $toc = .Params.toc }} -{{ else }} - {{ $toc = true }} +{{ $toc := true }} +{{ if isset .Site.Params "toc" }} + {{ $toc = .Site.Params.toc }} {{ end }} +{{ $toc = and ($toc) (ge .WordCount .Site.Params.tocWordCount) }} {{ if $toc }}