Allow for omitting date on post

Previously, all posts had to show a date. If the `date:` attribute was removed from the md file, then something like "0000 Jan 01" would default. 

This is use for static pages that are not part of the blog structure, like a separate "about" or "contact" page.
This commit is contained in:
James Lloyd 2020-07-30 00:23:05 -06:00 committed by GitHub
parent 384b63ad68
commit 5af0eb8056
1 changed files with 1 additions and 2 deletions

View File

@ -10,8 +10,7 @@
<div class="post">
<header class="post__header">
<h1 id="post__title">{{.Title}}</h1>
<time datetime="{{ .Date }}" class="post__date"
>{{ .Date.Format $dateFormat }}</time>
{{ if .Date }}<time datetime="{{ .Date }}" class="post__date">{{ .Date.Format $dateFormat }}</time> {{ end }}
</header>
<article class="post__content">
{{ partial "anchored-headings.html" .Content }}