Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
patch for hugo 0.57
  • Loading branch information
DuckLL committed Aug 16, 2019
1 parent 6d6934b commit 5c27883
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions layouts/index.html
Expand Up @@ -3,7 +3,7 @@
<header class="list-header offscreen">
<h2 class="list-label">All Posts</h2>
</header>
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") (index .Site.Params "paginate" | default 10) }}
{{ $paginator := .Paginate (where site.RegularPages "Type" "post") (index .Site.Params "paginate" | default 10) }}
{{ if ne $paginator.TotalPages 0 }}
{{ range $paginator.Pages.ByDate.Reverse }} {{ .Render "summary" }} {{ end }}
{{ else }}
Expand All @@ -14,13 +14,9 @@ <h2 class="list-label">All Posts</h2>
<nav class="pagination">
<h3 class="offscreen">Pagination</h3>
{{ if $paginator.HasPrev }}
<a class="pagination-previous" href="{{ $paginator.Prev.URL }}"
>← Newer Posts</a
>
<a class="pagination-previous" href="{{ $paginator.Prev.URL }}">← Newer Posts</a>
{{ end }} {{ if $paginator.HasNext }}
<a class="pagination-next" href="{{ $paginator.Next.URL }}"
>Older Posts →</a
>
<a class="pagination-next" href="{{ $paginator.Next.URL }}">Older Posts →</a>
{{ end }}
</nav>
</footer>
Expand Down

0 comments on commit 5c27883

Please sign in to comment.