I try to include/exclude sections from a list with a parameter in the frontmatter of _index.md
---
title: foo
exclude: true
---
or
---
title: foo
exclude: false
---
I used this for a while:
{{ $sections := .Site.Sections }}
{{ range where $sections ".Params.exclude" "ne" "true" }}
but only today I realized that it does not what I want.
AFAICS it looks if “exclude” is set at all not if it is not true. Sections with exclude: nil
are included, sections with exclude: false
are not included.
My guess is that I misunderstand the syntax here. Can anyone help me?