Don't add tags div if there aren't any tags

This commit is contained in:
Shea Polansky 2020-03-21 19:42:36 -07:00
parent fa8ad522cc
commit e7a39ea0aa

View file

@ -5,6 +5,7 @@
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}} {{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p> <p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
<!-- tags --> <!-- tags -->
{{ if .Param "tags" }}
<div id="tags"> <div id="tags">
<ul> <ul>
{{ range .Param "tags" }} {{ range .Param "tags" }}
@ -15,6 +16,8 @@
{{ end }} {{ end }}
</ul> </ul>
</div> </div>
{{ end }}
<h1>{{ .Title }}</h1>
<!-- content --> <!-- content -->
<div id="contentBody"> <div id="contentBody">
{{ .Content }} {{ .Content }}