mirror of
https://github.com/LukasJoswiak/etch.git
synced 2024-07-05 13:24:16 -04:00
ddc100f5c5
When `lastmod` is specified, a post would indicate that it was updated, but it incorrectly used the original date instead of the modification date.
18 lines
476 B
HTML
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 }}
|