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.
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.
-
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
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.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.
-
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
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.