added option to format date on tag list (#575)

Earlier, the date format was hard coded to `2006-01-02`. Now the site wide parameter `dateFormat` can be used to optionally set the format on post lists.
This commit is contained in:
teremich
2026-04-05 22:59:33 +02:00
committed by GitHub
parent 5a2b4c0f1f
commit 0258c67535
+6 -1
View File
@@ -14,7 +14,12 @@
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{- .Date.Format "2006-01-02" -}}
{{- $date := .Date -}}
{{- with .Site.Params.DateFormat -}}
{{- $date.Format . -}}
{{- else -}}
{{- $date.Format "2006-01-02" -}}
{{- end -}}
</time>
{{- end -}}
{{- with .Params.Author -}}