I am using mainSections to generate the list page of posts for my blog located in the content/posts
directory.
It’s picking up the posts correctly but also generating a root “Posts” page as well. This happens when there is and isn’t _index.md
present in content/posts
. Here is my code. Sure it’s pretty straightforward but any help is greatly appreciated.
{{ $paginator := .Paginate (where .Site.Pages "Section" "in" .Site.Params.mainSections) }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
{{ end }}