{{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) }}

{{ T "toc" }}

{{ $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default false }}
{{.TableOfContents}}
{{- end }}