list.html (680B)
1 {{ define "main" }} <h1>{{ .Title }}</h1> 2 <ul> 3 {{ if .IsHome }} 4 {{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "posts") }}{{ range $paginator.Pages }} 5 <li><h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>{{ .PublishDate.Format "Jan 2, 2006" }}{{ if ne .Lastmod .PublishDate }} updated{{ end }}, {{ .ReadingTime }} min read</li>{{ end }} 6 </ul>{{ partial "pagination.html" $ }} 7 {{ else }} 8 {{ range .Pages.ByDate.Reverse }} 9 <li><h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>{{ .PublishDate.Format "Jan 2, 2006" }}{{ if ne .Lastmod .PublishDate }} updated{{ end }}, {{ .ReadingTime }} min read</li> 10 {{ end }} 11 </ul> 12 {{ end }} 13 {{ end }}