aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default/list.html
blob: 0367ee91cca53961900781930caf7dd96cb0eb26 (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
{{ 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").GroupByDate "2006")}}
{{ range $pag.PageGroups }}
<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>
{{ end }}
{{ partial "pagination.html" . }}
{{ end }}