Exclude content based on tag

Is it possible to exclude topics based on custom tags in the front matter? I know you can exclude draft topics but I’m looking to have different config files, each of which publishes a subset of the content.

I’ve scoured the documentation but I may have missed something.


{{ range .Pages }}
  {{ if not (in .Params.tags "some-tag") }}
  {{ end }}
{{ end }}

Thanks for helping out, @zwbetz. Where would I put that script? I’m guessing not in a config file…

That goes in your template. Then you could have logic that runs different template code depending on some flag in your config file, etc.

Ah, got it. I think I can make that work. Many thanks!