Let’s assume we have a folder structure like this:
blog/
├── post1.md
├── post2.md
└── post3/
├── _index.md
└── post3A.md
└── post3B.md
Now I would like to list in section blog all pages and sections (that is post1, post2, post3) that are childs of blog.
I don’t want to list the childs of post3 (that is post3A and post3B).
Here, section ‘post3’ functions as a kind of wrapper for a segmented larger post.
When I do
{{ range .Pages }}
in my according html I only get post1 and post2.
If I do
{{ range where .Site.Pages "Section" .Section }}
I get post1, post2, post3, post3A and post3B.
I tried
{{ range where (where .Site.Pages "Section" .Section) "Parent" .CurrentSection }}
but this gives an empty list.
Now I have no other idea. Can you help? Thank you!