fix for pages with no date value
About pages and similar might not have a meaningful date value, so avoid formatting the value if not present, since that would output a nonsensical value like “January 1, 0001”.
This commit is contained in:
parent
a4a6ec7e94
commit
721e229177
@ -1,6 +1,8 @@
|
||||
{{ define "main" }}
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
{{ if .Date }}
|
||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||
{{ end }}
|
||||
<div>
|
||||
<p>
|
||||
{{ .Content }}
|
||||
|
Loading…
Reference in New Issue
Block a user