Render "term" content if it exists; add a Posts header between the content and post list
This commit is contained in:
parent
4254726189
commit
02b0224247
1 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,18 @@
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
{{- $hasContent := false -}}
|
||||||
|
{{ with .Content }}
|
||||||
|
{{- $hasContent = true -}}
|
||||||
|
<section>
|
||||||
|
{{ . }}
|
||||||
|
</section>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $hasContent }}
|
||||||
|
<h2>Posts</h2>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{{- range .Pages -}}
|
{{- range .Pages -}}
|
||||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue