Added custom list entries date format config
This commit is contained in:
parent
09775164c7
commit
3ba85b5295
@ -155,7 +155,9 @@ homeCollection = 'posts'
|
||||
# Pagination size across all website, this is the same for homepage and single list page
|
||||
paginationSize = 100
|
||||
# Display summaries under post list entries
|
||||
listSummaries = false
|
||||
listSummaries = true
|
||||
# List entries date format
|
||||
listDateFormat = '2 Jan 2006'
|
||||
|
||||
# Social icons
|
||||
[[params.social]]
|
||||
|
@ -1,5 +1,13 @@
|
||||
<div class="post-line">
|
||||
<p class="line-date">{{ .Date.Format "2 Jan 2006" }} </p>
|
||||
|
||||
{{ $dateFormat := "2 Jan 2006"}}
|
||||
{{ with .Site.Params.listDateFormat }}
|
||||
{{ $dateFormat = .}}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<p class="line-date">{{ .Date.Format $dateFormat }} </p>
|
||||
|
||||
<div>
|
||||
<p class="line-title"> <a href="{{ .RelPermalink }}">{{ .Title }}</a></p>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user