summaryrefslogtreecommitdiff
path: root/layouts/partials/blog_index.html
blob: 7635e8905c9da40ddab088bc35939e2d0202134e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{ $paginator := .Paginator 10 }}
{{ range (.Paginate (where .Site.RegularPages  ".Params.category" "intersect" "blog")).Pages }}
  {{ partial "partials/article_list_full_item.html" . }}
{{ end }}

<nav class="blog-pages-list">
  Pages: 
  {{ if $paginator.HasPrev }}
    [ <a href="{{ $paginator.First.URL}}">previous</a> ]
  {{ end }}

  {{ range seq $paginator.TotalPages }}
    <a href="/blog/page/{{ . }}/">{{ . }}</a>
  {{ end }}

  {{ if $paginator.HasNext }}
    [ <a href="{{ $paginator.Next.URL}}">Next</a> ]
  {{ end }}
</nav>