Conditional generation
HelpNDoc allows you to include or exclude topics during documentation generation based on their tags or statuses. This makes it possible to tailor outputs for different audiences or purposes without duplicating projects. Conditional generation settings are defined per build in the Generate Documentation dialog.
Conditional generation by tags
Topics can be assigned one or more tags, which can then be used to filter content for specific builds.
- In the Included tags panel, select the tags whose topics should be included in the generated documentation.
- Only topics that contain at least one of the selected tags will be published.
- You can manage available tags by clicking Manage tags.
This feature is particularly useful for creating role-specific outputs, such as documentation for administrators, developers, or end users.
Conditional generation by status
Each topic can also have a status to indicate its level of completeness or review stage.
- In the Included statuses panel, select the statuses whose topics should be included in the generated documentation.
- Topics with statuses not selected here will be excluded from the output.
- You can manage available statuses by clicking Manage statuses.
This feature is useful for filtering drafts, excluding outdated material, or generating documentation intended for review.
Combining tags and statuses
Both filters can be used together:
- A topic must match at least one of the selected tags and at least one of the selected statuses to be included.
- This allows precise control, for example including only Developer topics marked as Complete.
By configuring conditional generation, you can produce multiple customized outputs from a single HelpNDoc project, ensuring that each audience receives only the relevant information.