mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
⚡ Perf: only show update date when update date not equal publish date
This commit is contained in:
@@ -48,11 +48,13 @@
|
||||
{{- printf `<time datetime="%v">%v</time>` . . | safeHTML -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
{{- with .Lastmod | dateFormat (.Site.Params.dateformat | default "2006-01-02") -}}
|
||||
<span title="{{ dict "Date" ("2006-01-02 15:04:05" | $.Lastmod.Format) | T "single.updatedOnDate" }}">
|
||||
{{- dict "Class" "fa-regular fa-edit fa-fw me-1" | partial "plugin/icon.html" -}}
|
||||
{{- printf `<time datetime="%v">%v</time>` . . | safeHTML -}}
|
||||
</span>
|
||||
{{- if ne .Lastmod.Unix .PublishDate.Unix }}
|
||||
{{- with .Lastmod | dateFormat (.Site.Params.dateformat | default "2006-01-02") -}}
|
||||
<span title="{{ dict "Date" ("2006-01-02 15:04:05" | $.Lastmod.Format) | T "single.updatedOnDate" }}">
|
||||
{{- dict "Class" "fa-regular fa-edit fa-fw me-1" | partial "plugin/icon.html" -}}
|
||||
{{- printf `<time datetime="%v">%v</time>` . . | safeHTML -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if $params.wordCount -}}
|
||||
<span title="{{ T "single.wordCount" .WordCount }}">
|
||||
|
||||
Reference in New Issue
Block a user