Merge pull request #72 from Phyxius/no-zero-dates

Don't show date if not set
This commit is contained in:
Kazuki Koide 2020-03-23 16:05:57 +09:00 committed by GitHub
commit 7aa4f02cd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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">