🔧 🐛 Fixed #109 & change post date display.

This commit is contained in:
elkan1788
2024-11-30 20:38:49 +08:00
parent fdfcadadcc
commit ae09494361
4 changed files with 13 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
{{ if and .Site.Params.postMeta.updated.enable .Site.Params.postMeta.updated.anotherDay }}
{{ if and .Lastmod (gt .Lastmod .Date) }}
{{ $modDate := .Lastmod.Format .Site.Params.dateFormat }}
{{ $modTime := .Lastmod.Format .Site.Params.timeFormat }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
@@ -8,7 +9,9 @@
<span class="post-meta-item-text" title="{{ T "PostMeta.lastmod.date" }}">
{{ print (T "PostMeta.lastmod.date") (T "Symbol.colon") }}
</span>
<time title="{{ print (T "PostMeta.lastmod.time") (T "Symbol.colon") }}{{ $modTime }}" itemprop="dateModified" datetime="{{ $modTime }}">{{ .Lastmod.Format .Site.Params.dateFormat }}</time>
<time title="{{ print (T "PostMeta.lastmod.time") (T "Symbol.colon") }}{{ $modTime }}" itemprop="dateModified dateLastmod" datetime="{{ .Lastmod }}">
{{ $modDate }}
</time>
</span>
{{ end }}
{{ end }}