Script files are the heart of HTML based templates as they include a mix of HTML and Pascal code used to instruct HelpNDoc on how to generate the final documentation. Using those very powerful script files, it is possible to customize almost any part of the generated documentation files.
Script files' names must adhere to the following pattern: FILENAME.pas.EXTENTION where:
- FILENAME is the name of the script file and can be any valid file name;
- EXTENTION is usually the final extension this file will generate.
As an example HelpNDoc's default HTML template includes the "topics.pas.html" file which is used to generate HTML files for topics.
Create a new script
By using the "New Script" button, the Script Editor window is displayed where it is possible to:
- Enter the new script's name
- Build the script to make sure it doesn't contain any error
- Access the help file with methods available in templates
- Enter the content of the script using an editor with syntax highlighting
- Save or cancel the edition of the script
Edit a script
Once a script is selected in the list, use the "Edit Script" button to access the script editor and change its name or content.
Rename a script
Once a script is selected in the list, use the "Rename Script" button to rename it. Note: a script must contain the ".pas." text in its name before its extension (e.g. index.pas.html).
Delete a script
Once a script is selected in the list, use the "Delete Script" button to delete that script from the currently selected template. This script won't be run anymore when the final documentation is generated.
Other HTML based template settings: