How do I only refer to the top-level articles in writing/ for the /writing/ index page (while ignoring articles in writing/personal)?
Along the same lines, how do I refer only to articles in writing/personal in the /writing/ index page?
Looping over .Data.Pages in /writing/ gives me all articles. And I am unable to use either .Type or .Section to differentiate between the two kinds of articles.
I solved this by splitting and checking the .RelPermalink variable, and using the len to work out where the page was in the path (my aim was to categorise by folder and file location), which then meant the one before it in the array (of the split variable) was the final sub folder
I am able to do things like the following within the individual page template (instead of using len as you mentioned):
{{ if in (split .RelPermalink "/") "personal" }}personal{{ end }}
But how do I do the same thing within the index page? I am not able to access split on .RelPermalink as easily. The closest my experiments have gotten are:
{{ range where .Data.Pages "RelPermalink" "in" "/writing/personal/specific-post/" }}
{{ .Render "summary"}}
{{ end }}