I’m trying to iterate over posts organized like this (czech
is a language-based content directory):
in my layouts/index.html
theme template. However, code like this:
{{ $posts := where .Site.RegularPages "Type" "posts" }}
{{ printf "%#v" $posts }}
returns only:
page.Pages{}
It works just fine, if I use structure like content/czech/posts/priklad-clanku/index.md
. How can I fix this? I don’t want to use page bundles because I’m using Forestry as a CMS. I also notice it works when using https://github.com/forestryio/hugo-theme-novela, but I wasn’t able to discover the catch. What should I try to fix this?
EDIT: I need to be able to paginate these posts, otherwise I could work with those posts as page resources.