Edit online

How to Use a Publishing Template from a Command Line

Before you run the transformation, you need to know if the publishing template has a single template descriptor file or multiple descriptor files. If you don't know, open the ZIP archive or folder and check for files with the .opt extension.

Edit online

Using a Publishing Template with a Single Descriptor

A template with a single descriptor is used for a single customization.

To run from a command line, you need to use the webhelp.publishing.template parameter. This parameter specifies the path to the ZIP archive (or root folder) that contains your custom WebHelp Responsive template.

Command-Line Example:
  • Windows:
     dita.bat 
        --format=webhelp-responsive
        --input=c:\path\to\mySample.ditamap  
        --output=c:\path\to\output 
        -Dwebhelp.publishing.template=custom-template
  • Linux/macOS:
     dita
        --format=webhelp-responsive
        --input=/path/to/mySample.ditamap  
        --output=/path/to/output 
        -Dwebhelp.publishing.template=custom-template
Tip: You can also start the dita process by passing it a DITA OT Project File. Inside the project file you can specify as parameters for the webhelp-responsive transformation type the WebHelp-related parameters.
Edit online

Using a Publishing Template with Multiple Descriptors

A template with multiple descriptors contains multiple customizations.

Because the publishing template is self-contained, it is used to reuse resources that are common to multiple publications.

To run from a command line, you need to use the webhelp.publishing.template and webhelp.publishing.template.descriptor parameters.

The webhelp.publishing.template parameter specifies the path to the ZIP archive (or root folder) while the webhelp.publishing.template.descriptor parameter specifies the name of the descriptor you want to use.

Command-Line Example:
  • Windows:
     dita.bat 
        --format=webhelp-responsive
        --input=c:\path\to\mySample.ditamap  
        --output=c:\path\to\output 
        -Dwebhelp.publishing.template=custom-template
        -Dwebhelp.publishing.template.descriptor=flowers.opt 
  • Linux/macOS:
     dita
        --format=webhelp-responsive
        --input=/path/to/mySample.ditamap  
        --output=/path/to/output 
        -Dwebhelp.publishing.template=custom-template
        -Dwebhelp.publishing.template.descriptor=flowers.opt 
Tip: You can also start the dita process by passing it a DITA OT Project File. Inside the project file you can specify as parameters for the webhelp-responsive transformation type the WebHelp-related parameters.