fixup! Don't show date information of post when no date is set

This commit is contained in:
Frieder Schrempf 2020-12-29 10:13:05 +01:00
commit 2c65850e1a
No known key found for this signature in database
GPG key ID: E7DD51F45F833802

View file

@ -1,3 +1,3 @@
{{ with .Param "author" }}<span class="author" itemprop="author">{{ . }}</span>{{ end -}}
{{ if and .Date (.Param "author") }} - {{ end -}}
{{ with $.Param "author" }}<span class="author" itemprop="author">{{ . }}</span>{{ end -}}
{{ if and .Date ($.Param "author") }} - {{ end -}}
{{ with .Date }}<time class="created-date" datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ .Format ($.Param "dateformat" | default "2 January, 2006") }}</time>{{ end }}