I’ve read this article already, but still have issues to apply this to my described problem. In my case the page should not define if it is rendered. I need to define from another global point if a page that meets a requirement is rendered or not.
Build the site, ignoring content with .a. in the filename:
HUGO_IGNOREFILES=[\\.a\\.] hugo --cleanDestinationDir
Build the site, ignoring content with .b. in the filename:
HUGO_IGNOREFILES=[\\.b\\.] hugo --cleanDestinationDir
Build the site, ignoring content with either .a. or .b. in the filename:
HUGO_IGNOREFILES=[\\.a\\.,\\.b\\.] hugo --cleanDestinationDir
To avoid creating URLs such as /post/post-1.a/ you will want to configure a permalink pattern for each content type. Something like
[permalinks]
post = "/:sections/:slug"
Finally, setting the configuration value HUGO_IGNOREFILES on the command line does not define the configuration value; it changes the existing value. Or to put it another way, you cannot change the ignoreFiles configuration option from the command line unless you first define it in the configuration file.
ignoreFiles = []
Remember, with the TOML syntax this must appear before tables and arrays of tables.