{{ $tocHTML := .TableOfContents }} {{ if and $tocHTML (ne (trim $tocHTML " \n\r\t") "") }} {{ end }}