Exclude Nested Section by Type

Since Type is now respected for list pages. How can I exclude a Nested Section and its contents based on Type?

Example _index.md front matter: type = "private"

Your question has nothing to do with 0.33 and type. It has always been possible to use Type in queries – but now also for layout selection.

Ok. I changed the topic title, since you think that this has nothing to do with Hugo 0.33.

But the question stands. I have tried and failed to filter a Nested Section by Type.

The following renders empty in sitemap.xml, (no errors in the console):

{{ $sections := (.Site.GetPage "section" .Section).Sections }}
{{ range where $sections "Type" "!=" "brand" }}
{{- range $i, $e := .Data.Pages -}}

For a Section it’s very easy to exclude. But for a Nested Section I really don’t know how to do it.

So anyone?

OK, maybe it can be related to your problem. But I don’t see it. You can set the layout to an empty/non-existing template, but it will still render your regular pages in that section.

Ok. I figured that much. Thank you for the reply.