Paginator not working after moving to version 0.77 from 0.51

the following code in index.html was working fine, until i upgraded to 0.77. Now it just displays a “Posts” title and a read more button and when I click the read more button it gets me to http://localhost:1313/posts/
where my posts appear fine with pagination.
I cannot understand why this is happening.

{{ $paginator := .Paginate (where .Data.Pages "Type" "posts") 10 }}
 <ul class="indexlist">
 {{ range $paginator.Pages }}
     <h1>{{ .Title }}</h1>
     <p><i><span class="author">By {{}}</span> &bull; <span class="date">{{ .Date.Format "January 2006" }}</span> &bull; {{ partial "readingTime.html" . }} </i>
     <p>{{.Summary}} </p>
     <a href="{{ .RelPermalink}}" class="btn btn-outline-primary">Read More...</a>
 {{ end }}

Change .Data.Pages to .Site.RegularPages.

thanks it worked!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.