{{- $showTOC := false -}} {{- if isset .Params "toc" -}} {{- $showTOC = .Params.Toc -}} {{- else if .Site.Params.Toc.enabled -}} {{- $showTOC = true -}} {{- end -}} {{- if $showTOC -}} {{- if gt .WordCount .Site.Params.Toc.wordCount -}} {{- end -}} {{- end -}}