Merge pull request #18 from vxnick/override-single-datetime
Allow the date/time format on the single template to be overridden
This commit is contained in:
commit
219f231f12
@ -22,7 +22,7 @@
|
|||||||
<p class="single-readtime">
|
<p class="single-readtime">
|
||||||
{{ with .Date }}
|
{{ with .Date }}
|
||||||
{{ $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }}
|
{{ $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>
|
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
@ -88,4 +88,4 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user