blob: fc6133145649e331e4b0ce5367f6771d5c756dc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<section>
{{ $prev := now.Format "2006"}} <!--start from the current year-->
<h2 class="title is-2 top-pad">{{ $prev }}</h2>
{{range .Pages.ByPublishDate.Reverse}}
{{if .Date}}
{{$curr := .Date.Format "2006"}}
{{if lt $curr $prev }}
<h2 class="title is-2 top-pad">{{ $curr }}</h2>
{{end}}
<li class="post-item">
{{ if .Params.date }}
<span>{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}</span> -
{{ end }}
<span><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></span>
</li>
{{ $prev = $curr}}
{{end}}
{{end}}
</section>
|