{{/* The page's headings, linked, when it has three or more. Pass the page. */}} {{ $h := headings .Content }} {{ if and (ge (len $h) 3) (ne (printf "%v" .Params.toc) "false") }} On this page {{ range $h }}{{ .Text }}{{ end }} {{ end }}