diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-07-31 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-07-31 00:00:00 +0000 |
commit | 96701f5f94a30f72bb6f3834f0445ce16f899a7e83eed4c74ffd0cc360d4db4e (patch) | |
tree | 1867ce6b3df3f9b00d1e297fd6d5194737422b856ead8d61aaecd63d5be8945c /layouts/partials/pageinfo.html | |
parent | bac4e7fabed4319f91f9f6be0f92c9c4fdff9ec0a61275a339e0271d2ccaffa8 (diff) | |
download | hugo-theme-journal-96701f5f94a30f72bb6f3834f0445ce16f899a7e83eed4c74ffd0cc360d4db4e.tar.gz hugo-theme-journal-96701f5f94a30f72bb6f3834f0445ce16f899a7e83eed4c74ffd0cc360d4db4e.zip |
Add multilingual support for dates
Diffstat (limited to 'layouts/partials/pageinfo.html')
-rw-r--r-- | layouts/partials/pageinfo.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/pageinfo.html b/layouts/partials/pageinfo.html index 4c8f419..42d2e90 100644 --- a/layouts/partials/pageinfo.html +++ b/layouts/partials/pageinfo.html @@ -1,2 +1,2 @@ -{{ $dateFormat := .Site.Params.dateFormat | default "2 Jan 2006" -}} -{{ emojify ":calendar:" | safeHTML }} {{ .Page.PublishDate.Format $dateFormat | safeHTML }} | {{ emojify ":stopwatch:" | safeHTML }} {{ i18n "readingTime" .ReadingTime | safeHTML }}{{ if .Page.Params.Tags }} | {{ emojify ":label:" | safeHTML }} {{ end }}{{ range $key, $val := .Page.Params.Tags }}{{ if $key }}, {{ end }}<a class="link" href='{{ "/tags/" }}{{ . | urlize }}' rel="noreferrer">{{ $val }}</a>{{ end }} +{{ $dateFormat := .Site.Params.dateFormat | default ":date_long" -}} +{{ emojify ":calendar:" | safeHTML }} {{ .Page.PublishDate | time.Format $dateFormat | safeHTML }} | {{ emojify ":stopwatch:" | safeHTML }} {{ i18n "readingTime" .ReadingTime | safeHTML }}{{ if .Page.Params.Tags }} | {{ emojify ":label:" | safeHTML }} {{ end }}{{ range $key, $val := .Page.Params.Tags }}{{ if $key }}, {{ end }}<a class="link" href='{{ "/tags/" }}{{ . | urlize }}' rel="noreferrer">{{ $val }}</a>{{ end }} |