fix(i18n): fix unlocalized article publish/lastUpdated date (#1050)

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/1040
This commit is contained in:
weeix 2024-09-07 18:48:09 +07:00 committed by GitHub
parent fcd56dd21c
commit 374b25a60f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,7 @@
<div> <div>
{{ partial "helper/icon" "date" }} {{ partial "helper/icon" "date" }}
<time class="article-time--published"> <time class="article-time--published">
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}} {{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
</time> </time>
</div> </div>
{{ end }} {{ end }}

View file

@ -12,7 +12,7 @@
<section class="article-lastmod"> <section class="article-lastmod">
{{ partial "helper/icon" "clock" }} {{ partial "helper/icon" "clock" }}
<span> <span>
{{ T "article.lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }} {{ T "article.lastUpdatedOn" }} {{ .Lastmod | time.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
</span> </span>
</section> </section>
{{- end -}} {{- end -}}