etch/layouts/_default/single.html
Anaminus ddc100f5c5
Fix modification date displaying as original date (#33)
When `lastmod` is specified, a post would indicate that it was updated, but it incorrectly used the original date instead of the modification date.
2022-02-22 17:43:08 -08:00

18 lines
476 B
HTML

{{ define "main" }}
<article>
<header id="post-header">
<h1>{{ .Title }}</h1>
<div>
{{- if isset .Params "date" -}}
{{ if eq .Lastmod .Date }}
<time>{{ .Date | time.Format (i18n "post.created") }}</time>
{{ else }}
<time>{{ .Lastmod | time.Format (i18n "post.updated") }}</time>
{{ end }}
{{- end -}}
</div>
</header>
{{- .Content -}}
</article>
{{ end }}