Allow the date/time format on the single template to be overridden
Example: ```toml [params] singleDateFormat = '2 January 2006' ```
This commit is contained in:
parent
68babca981
commit
43d8150392
@ -22,7 +22,7 @@
|
||||
<p class="single-readtime">
|
||||
{{ with .Date }}
|
||||
{{ $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := . | time.Format ":date_long" }}
|
||||
{{ $dateHuman := . | time.Format (default ":date_long" $.Site.Params.singleDateFormat) }}
|
||||
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||
{{end}}
|
||||
|
||||
@ -88,4 +88,4 @@
|
||||
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user