summaryrefslogtreecommitdiff
path: root/layouts/_default/list.html
diff options
context:
space:
mode:
authorNortherner-coder <50540933+Northerner-coder@users.noreply.github.com>2020-10-16 12:42:32 -0400
committerGitHub <noreply@github.com>2020-10-16 22:12:32 +0530
commitdb52aa994294f3f2a412efee7802c752073018e2 (patch)
tree88c2cbc32900cd3901a44229b9c282ee0f1db07a /layouts/_default/list.html
parenta980d10bfc7d0d1e058afb5528c637ad39a5ef04 (diff)
layouts: Add DateFormat parameter (#39)
* User can change Date Format to be displayed in Front Matter * Formats supported by Hugo can be found here: https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference
Diffstat (limited to 'layouts/_default/list.html')
-rw-r--r--layouts/_default/list.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index ebe7b0d..a92fe71 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -52,7 +52,7 @@
</section>
{{- end }}
<footer class="entry-footer">
- <time>{{ .Date.Format "January 2, 2006" }}</time>
+ <time>{{ .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>
{{- if $.Site.Params.ShowReadingTime }}&nbsp;ยท&nbsp;
{{- $default_txt := print .ReadingTime " " "min" }}
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}