I have the following directory structure :
content/
- posts/
- post-A/
- index.md
- post-B/
- index.md
- post-A/
I am using the following paginator in my home page template index.html
and it works.
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "posts") 6 }}
(I have 9 sample posts on my localhost, so get 2 pages created for homepage)
However, the same paginator code on _default/single.html
for a regular page results in nil. I also tried the site.RegularPages
, .Pages
, .Site.Pages
but same result.
Why this behaviour on my single page? Can somebody plesae help. Am I hitting a bug? My hugo version is v0.74.3/extended darwin/amd64
.