Render "term" content if it exists; add a Posts header between the content and post list

This commit is contained in:
Eryn Wells 2023-02-12 10:33:25 -08:00
parent 4254726189
commit 02b0224247

View file

@ -7,6 +7,18 @@
<h1>{{ .Title }}</h1>
</header>
{{- $hasContent := false -}}
{{ with .Content }}
{{- $hasContent = true -}}
<section>
{{ . }}
</section>
{{ end }}
{{ if $hasContent }}
<h2>Posts</h2>
{{ end }}
<ul>
{{- range .Pages -}}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>