diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-31 00:19:18 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-31 00:19:18 +0200 |
| commit | 882af0656327476b523e0d6538b29ae9ad6eda28 (patch) | |
| tree | 7487e3ef1b40fc15f8fb3a8520b6b03db6bcbf0c /layouts/partials/post-meta/date.html | |
| parent | 5e9831ac36147e229fbc40774199ea1cb961ca93 (diff) | |
| download | gohugo-theme-ed-882af0656327476b523e0d6538b29ae9ad6eda28.tar.gz | |
Mior reformatting of posts layout
Diffstat (limited to 'layouts/partials/post-meta/date.html')
| -rw-r--r-- | layouts/partials/post-meta/date.html | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/layouts/partials/post-meta/date.html b/layouts/partials/post-meta/date.html index 92401e7..04a814a 100644 --- a/layouts/partials/post-meta/date.html +++ b/layouts/partials/post-meta/date.html @@ -1,10 +1,11 @@ -{{- if not .Date.IsZero }} -<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}"> - {{- .Date | time.Format (site.Params.dateformat | default "January 02, 2006") -}} -</time> -{{- if ne .Date .Lastmod }} -<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}"> - ({{ i18n "updated_at" }} {{ .Lastmod | time.Format (site.Params.dateformat | default "January 02, 2006") -}}) -</time> -{{- end -}} -{{- end }} +{{ if not .Date.IsZero }} + <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}"> + {{ .Date | time.Format (site.Params.dateformat | default "January 02, 2006") }} + </time> + + {{ if ne .Date .Lastmod }} + <time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}"> + ({{ i18n "updated_at" }} {{ .Lastmod | time.Format (site.Params.dateformat | default "January 02, 2006") }}) + </time> + {{ end }} +{{ end }} |
