Sorry if this is a silly question, but I’m quite new to Jekyll, and haven’t yet got my head round some of the features.
It seems that every .md file in my project will be built and included in my static site. Can I do anything to stop some files being included at all in a specific output?
The reason I ask is because my first foray into Jekyll has a requirement to support single-sourced content, including multiple output sites from the same content, to support multiple product variants. Liquid allows us to define conditionally-included content, and to specify different configuration files for different builds, so different outputs can have content differences within an output page. For example, a paragraph may be included in the output for product variant A but may not apply to product variant B, although everything else on the page applies to both products.
Is there a way to stop a page from being included in one or more outputs at all, if nothing on that page applies to that product variant? I can figure out how to exclude it from the site navigation, so nothing on the site links directly to it, but if it’s present in the output at all, it’s still going to be included in any search results, and will also be available to anyone via the URL. This may be confusing and undesirable.
Do we need to do some pre- or post-processing, and manually remove the pages that don’t apply to this build, or is there a configurable way to tell Jekyll to exclude some files in the project structure from the build?
Thanks in anticipation