Some layout tweaks for the term template

Allow removing the pages list if the "pages" page variable is set false.
This commit is contained in:
Eryn Wells 2023-04-23 22:07:27 +09:00
parent f21ac49b08
commit 66d50f773b

View file

@ -12,20 +12,20 @@
{{- $hasContent := false -}}
{{ with .Content }}
{{- $hasContent = true -}}
<section>
{{ . }}
</section>
{{ end }}
{{ if $hasContent }}
<h2>Posts</h2>
{{ end }}
{{ if .Params.posts | default true }}
{{ if and $hasContent }}
<h2>Posts</h2>
{{ end }}
<ul>
{{- range .Pages -}}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{- end -}}
</ul>
<ul>
{{- range .Pages -}}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{- end -}}
</ul>
{{ end }}
{{ end }}
{{ define "footer" }}