From b4393b3d6e775d9c05b92b3f35bd74f5c3475ef5 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 2 Sep 2021 13:43:08 +0530 Subject: [PATCH] Add `post-content` only if it exists --- layouts/_default/list.html | 2 ++ layouts/_default/single.html | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 110c2450..57f9ad37 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -16,11 +16,13 @@ {{- end }} +{{- if .Content }}
{{- if not (.Param "disableAnchoredHeadings") }} {{- partial "anchored_headings.html" .Content -}} {{- else }}{{ .Content }}{{ end }}
+{{- end }} {{- $pages := union .RegularPages .Sections }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8a85fc81..8d42cd75 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -25,11 +25,15 @@ {{- if (.Param "ShowToc") }} {{- partial "toc.html" . }} {{- end }} + + {{- if .Content }}
{{- if not (.Param "disableAnchoredHeadings") }} {{- partial "anchored_headings.html" .Content -}} {{- else }}{{ .Content }}{{ end }}
+ {{- end }} +