Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Commit

Permalink
Add use .Site.RegularPages for pagination
Browse files Browse the repository at this point in the history
Hugo v0.57.0 changed the behavior of the page variables. This caused
some broken theme demos. This fix uses .Site.RegularPages to get former,
expected list of pages back.
  • Loading branch information
digitalcraftsman committed Aug 17, 2019
1 parent 6475c81 commit 314516a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/post-list.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<main>
<div id="home">
<ul class="posts">
{{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") }}
{{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Type" "post") }}
{{ range $paginator.Pages }}
<li itemscope itemtype="//schema.org/BlogPosting">
<a href="{{ .Permalink }}" itemprop="url">
Expand Down

0 comments on commit 314516a

Please # to comment.