Don't show dates if not set

This commit is contained in:
Shea Polansky 2019-09-15 10:35:55 -07:00
parent 6f679a10c3
commit 5e806e3b8b

View file

@ -1,9 +1,11 @@
{{ define "main"}}
<h1>{{ .Title }}</h1>
{{ partial "header.html" . }}
{{ if not .Date.IsZero }}
<!-- date -->
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
{{ end }}
<!-- tags -->
{{ if .Param "tags" }}
<div id="tags">