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:
@@ -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 -}}
|
||||
|
||||
Reference in New Issue
Block a user