blob: e4992fe0f4a1d0b31279cec46648e69d9c6b1830 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ with .Content }}
{{ . }}
{{ end }}
{{ if .Parent.IsHome }}
{{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" .Section) }}
{{ else }}
{{$.Scratch.Set "blog-pages" .Pages }}
{{ end }}
{{ $pag := .Paginate (( $.Scratch.Get "blog-pages").GroupByPublishDate "2006")}}
{{ range $pag.PageGroups }}
{{ if ne .Key "0001" }}
<h2>{{ T "post_posts_in" }} {{ .Key }}</h2>
<ul>
{{ range .Pages }}
<li>{{ .PublishDate.Format "2006-01-02" }} - <a href="{{ .RelPermalink }}">{{ .Title }}</a> : {{ .Description }}</li>
{{ end }}
</ul>
{{ else }}
<h2>Docs</h2>
<ul>
{{ range .Pages }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> : {{ .Description }}</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
{{ partial "pagination.html" . }}
{{ end }}
|