diff --git a/layouts/partials/articles_for_section.html b/layouts/partials/articles_for_section.html index 1531be9c..880187a3 100644 --- a/layouts/partials/articles_for_section.html +++ b/layouts/partials/articles_for_section.html @@ -3,7 +3,6 @@ {{ range $index, $element := $paginator.Pages }}
{{ partial "post_header_list.html" . }} - {{ partial "toc.html" . }}
{{.Content }}
diff --git a/layouts/partials/body_single.html b/layouts/partials/body_single.html index 9c8d39d9..f95a9b62 100644 --- a/layouts/partials/body_single.html +++ b/layouts/partials/body_single.html @@ -3,7 +3,7 @@
{{ partial "post_header_single.html" . }}
- {{ if isset .Params "toc" }}{{ .TableOfContents }}{{ end}} + {{ partial "toc.html" . }} {{ .Content }} {{ if eq .Section "resource" }}{{ partial "backlinks.html" . }}{{ end }} {{ partial "article_footer.html" . }} diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 64546ec0..f3f4eaf9 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -1 +1 @@ -{{ .TableOfContents }} +{{- if isset .Params "toc" }}{{ .TableOfContents }}{{ end}}