From 02b0224247db6e0e950eabf38584818b20ff2aaa Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 12 Feb 2023 10:33:25 -0800 Subject: [PATCH] Render "term" content if it exists; add a Posts header between the content and post list --- layouts/_default/term.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 5ae43d7..23491df 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -7,6 +7,18 @@

{{ .Title }}

+{{- $hasContent := false -}} +{{ with .Content }} + {{- $hasContent = true -}} +
+ {{ . }} +
+{{ end }} + +{{ if $hasContent }} +

Posts

+{{ end }} +