summaryrefslogtreecommitdiffstats
path: root/layouts/partials/post-meta/date.html
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-06-05 17:39:03 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-06-05 17:39:03 +0200
commit05328e8151a3bc430469b064cb50bc6b54c272c0 (patch)
tree2944108abaaed9b55761322d6a04255cddd59102 /layouts/partials/post-meta/date.html
parentd2c67443876977d5f0479017711672a121267baf (diff)
downloadgohugo-theme-ed-05328e8151a3bc430469b064cb50bc6b54c272c0.tar.gz
Rework post dates format
Diffstat (limited to 'layouts/partials/post-meta/date.html')
-rw-r--r--layouts/partials/post-meta/date.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/layouts/partials/post-meta/date.html b/layouts/partials/post-meta/date.html
index 42747f2..b2537b7 100644
--- a/layouts/partials/post-meta/date.html
+++ b/layouts/partials/post-meta/date.html
@@ -1,6 +1,7 @@
{{ $date := .Date | time.Format (site.Params.dateFormat | default "January 02, 2006") }}
{{ $lastmod := .Lastmod | time.Format (site.Params.dateFormat | default "January 02, 2006") }}
+{{ i18n "published_on" }}
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ $date }}
</time>
@@ -8,7 +9,9 @@
{{/* Check that lastmod exists and is greater than date
(i.e. the last modified date must be after the publish date) */}}
{{ if and (ne $lastmod $date) (gt .Lastmod .Date) }}
+ <span>•</span>
+ {{ i18n "updated_on" }}
<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">
- ({{ i18n "updated_at" }} {{ $lastmod }})
+ {{ $lastmod }}
</time>
{{ end }}