From d283b2babb18cf5890bb8f71f72aec304791b74e Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 24 Feb 2023 21:28:41 +0800 Subject: [PATCH] Update datetime metadata It is closer to the specification at the following document: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-global-date-and-time-string --- CHANGELOG.adoc | 2 ++ layouts/_default/single.html | 4 ++-- layouts/partials/components/post-meta.html | 17 +++++++++++------ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 5fc0075..496e269 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -24,6 +24,8 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version - Revert the site layout. +- Update the datetime string for the appropriate components. + diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c52ec00..918e64e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -35,12 +35,12 @@ {{- if ne (.PublishDate.Format "2006") "0001" -}} -

{{ i18n "published_on" }}:

+

{{ i18n "published_on" }}:

{{- end }} {{- if ne .PublishDate .Lastmod }} -

{{ i18n "updated_on" }}:

+

{{ i18n "updated_on" }}:

{{- end }} diff --git a/layouts/partials/components/post-meta.html b/layouts/partials/components/post-meta.html index 1400327..a031a28 100644 --- a/layouts/partials/components/post-meta.html +++ b/layouts/partials/components/post-meta.html @@ -2,19 +2,24 @@ The component where it will display the metadata of the post. This is used on list templates but feel free to change that. */ -}} +{{- $RFC3339 := "2006-01-02T15:04:05Z07:00" }}