{{ .Scratch.Set "hasTOC" (ge (len .TableOfContents) 100) }} {{ define "body-class" }}article-page keep-sidebar{{ if .Scratch.Get "hasTOC" }} has-toc{{ end }}{{ end }} {{ define "container-class" }}extended{{ end }} {{ define "main" }} {{ partial "article/article.html" . }} {{ partial "article/components/related-contents" . }} {{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}} {{ partial "comments/include" . }} {{ end }} {{ partialCached "footer/footer" . }} {{ partialCached "article/components/photoswipe" . }} {{ end }} {{ define "left-sidebar" }} {{ if .Scratch.Get "hasTOC" }}
{{ else }} {{ partial "sidebar/left.html" . }} {{ end }} {{ end }} {{ define "right-sidebar" }} {{ if .Scratch.Get "hasTOC" }} {{ end }} {{ end }}