feat: nice date on posts section
This commit is contained in:
parent
565fa157d3
commit
2c5d44ee0b
1 changed files with 3 additions and 1 deletions
|
|
@ -2,9 +2,11 @@
|
|||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ range .Pages }}
|
||||
{{ $dateMachineP := .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHumanP := .PublishDate | time.Format ":date_long" }}
|
||||
<section>
|
||||
<h2 class="no-bottom-margin"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
<h4 class="no-top-margin">{{ .PublishDate }}</h4>
|
||||
<h4 class="no-top-margin"><time datetime="{{ $dateMachineP }}">{{ $dateHumanP }}</time></h4>
|
||||
{{ .Summary }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue