feat(): add support for pagination in _default/list.html

This commit is contained in:
kendo5731
2016-02-04 23:20:36 +01:00
parent f5b5ae55d9
commit f4d8ac34df
4 changed files with 25 additions and 5 deletions

View File

@@ -1,10 +1,12 @@
{{ partial "top.html" . }}
{{ $paginator := .Paginate (where .Data.Pages "Type" "blog") }}
<div class="articles-list">
{{ range .Data.Pages }}
{{ range $paginator.Pages }}
<article>
<h3><a href="{{ .Permalink }}">{{ .Title }}</a> - {{ dateFormat "01-02-2006 15:04:05" .Date }}</h3>
{{ .Summary }}
</article>
{{ end }}
</div>
{{ template "_internal/pagination.html" . }}
{{ partial "bottom.html" . }}