How to target pages within cascades (config) according to a frontmatter parameter?

Hi,
I mean to produce a different version of the site through a command line parameter, and an additional config:

hugo --minify --gc --config expurged-version.toml hugo.toml

But then I need to not render pages not made for the expurged version of the site. On the doc I can only target through kind, lang, and path. If I can’t, then I’ll have to rename the undesired files in the script.

Search open issues for “cascade”:

https://github.com/gohugoio/hugo/issues?q=is%3Aissue+is%3Aopen+cascade

You will find:

https://github.com/gohugoio/hugo/issues/10936

I read that already, so I assume the answer is “you can’t (yet)” ? I should be asking: can you think of another way to do what I suggested ?

Yes, that’s why the issue is still open.

Content mounts. See the forum topic associated with the issue referenced above.

But it would force me to separate files ok with the expurged version and those not in ok, in two different folders, right ?

Why don’t you try it?

No I’m not separating the content that way, just too bothersome. However… I can create empty versions of the undesired files, with a header asking for not building the file. Pretty counter-intuitive, creating a file not to render it, but it should overwrite the files with same names.
Works !! Thanks.