HelpNDoc allows you to associate an unlimited number of files with each build. These build assets are automatically exported to the build's output directory, maintaining their relative structure.

This feature is particularly beneficial when you need to include additional files that are essential for your documentation's functionality, such as:

  • Custom CSS or JavaScript files for HTML documentation to modify styling or add interactive elements.
  • Additional images, icons, or multimedia files that are not embedded directly in the documentation but should be available in the output.
  • Configuration files, scripts, or templates that are required when deploying the documentation alongside an application.
  • PDFs, spreadsheets, or supplementary guides that should be included in the final exported package.

Access the "Build assets" panel

Each build has its own set of build assets. To access the "Build Assets" panel:

  • Open HelpNDoc's File menu.
  • Click the top part of the Generate Help button to open the Generate Documentation window.
  • Select a build from the build list.
  • Click Customize if the build customization tabs are not visible.
  • Navigate to the Build Assets tab.

Build assets management

  • Adding a Build Asset: Click Add Build Asset, then specify the asset's output path relative to the build's output directory.
  • Deleting a Build Asset: Select the asset from the list and click Delete.
  • Modifying the Asset's Output Path: Click the asset's Output Path in the list and enter the new path.

Build assets properties

When a build asset is selected, its properties can be customized in the "Asset properties" panel:

  • Source kind: Defines how the asset is handled:
    • Internal File: The content is read from disk and embedded directly into the HND project file. This ensures the asset remains accessible even if the project is moved or copied. However, large assets can increase the file size and reduce performance.
    • External File: The content is loaded from disk during generation but is not stored in the HND project file. This keeps the project file size smaller, but the external file must be available at generation time.
  • External File: Specifies the location of the external file to be loaded at generation time. The path can be relative to the current HND project file.
  • Internal Content: Loads content from an external file and stores it within the HND project file.

Example Use Cases for Build Assets in HelpNDoc

Build assets allow you to associate external or internal files with your documentation, ensuring they are exported to the build's output directory. This can be useful in a variety of scenarios, including:

1. Customizing HTML Documentation with CSS & JavaScript

Use Case: You are generating an HTML-based documentation website and want to apply a custom design or add interactive elements.

Solution:

  • Add a custom CSS file to style the documentation according to your company's branding.
  • Include a JavaScript file to enhance navigation with interactive menus or tooltips.

Result: When the documentation is generated, these files are automatically placed in the output directory, ensuring your HTML pages have the correct styling and functionality.

2. Packaging Additional Resources with Documentation

Use Case: Your documentation references supplementary files such as PDFs, spreadsheets, or example data files that users need.

Solution:

  • Add user manuals, templates, or sample reports as build assets.
  • Include CSV, XML or JSON files if your software requires sample data for users to test.

Result: When users download the documentation package, all necessary files are included, preventing missing resource issues.

3. Automating File Deployment for Web-Based Documentation

Use Case: Your organization publishes online documentation that needs additional assets, such as downloadable files, fonts, or scripts.

Solution:

  • Add downloadable ZIP files containing templates or additional software tools.
  • Include web fonts or third-party libraries used for custom UI elements.

Result: The web-based documentation is automatically published with all necessary resources, eliminating the need for manual file uploads.