Snippets are reusable pieces of content that can be inserted into topics and automatically expanded when the documentation is generated. Similar in concept to variables, they allow you to manage shared content from a single location while ensuring consistency throughout the project.

They are especially useful in several situations:

Overview of the user interface

1. Library item name

Specify a unique name for the snippet within the library. This name is used to identify and reuse the snippet throughout the project.

2. Commands

The following commands are available for the snippet library item:

3. Preview

Displays the current content of the snippet, allowing you to quickly review its contents without opening the editor.

Convert topic content to a snippet

You can quickly turn existing topic content into a reusable snippet, making it easy to maintain and reuse elsewhere in your documentation:

HelpNDoc will then prompt you to choose how to proceed:

Insert snippet content into a topic

In addition to inserting a snippet as a reference, you can directly insert its content into the current topic. This places a copy of the snippet's content into the topic, which can then be edited independently. To do this:

Alternatively, you can right-click the snippet in the library and select Insert in topic then click Insert content in topic from the context menu.

This approach is useful when you want to reuse existing content as a starting point but need to customize it for a specific topic without affecting the original snippet.