feat: nice date on posts section

This commit is contained in:
Iain Learmonth 2026-04-13 21:08:06 +01:00
parent 565fa157d3
commit 2c5d44ee0b

View file

@ -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 }}