feat: add dates and summaries to default section and term pages
This commit is contained in:
parent
2fa452c8b4
commit
596b4e4810
2 changed files with 22 additions and 13 deletions
|
|
@ -1,10 +1,13 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ range .Pages }}
|
||||
<section>
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
<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"><time datetime="{{ $dateMachineP }}">{{ $dateHumanP }}</time></h4>
|
||||
{{ .Summary }}
|
||||
</section>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ range .Pages }}
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
{{ end }}
|
||||
<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"><time datetime="{{ $dateMachineP }}">{{ $dateHumanP }}</time></h4>
|
||||
{{ .Summary }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue