Customize the DITA OT HTML5 output using a plugin

You can customize the default DITA Open Toolkit HTML5 output to use a plugin.

You can customize the default HTML5 output by providing to the DITA Open Toolkit a plugin which contains your custom stylesheets and CSS. Using Componize pipelines you can run this output processing and include standard transformation parameters through the use of pipeline options.

  1. Copy your HTML5 plugin into the plugins folder located in your DITA Open Toolkit installation.
    You can find more information on how to create your own DITA OT plugin online: https://www.dita-ot.org/dev/topics/html-customization-plugins.html
  2. At the root of bin folder located in your DITA Open Toolkit installation, run the following command: dita --install
  3. Connect to the Alfresco Share interface.
  4. You can use a dita-ot.properties file to add any DITA OT transformation parameters for example the nav-toc parameter with value full, then copy that file in your Document Library.
    You can find a list of the available parameters for your output online: https://www.dita-ot.org/dev/parameters/parameters-html5.html
  5. At the root of your Document Library, update the DITA Open Toolkit pipeline configuration file named ditaot-html5.xml. Add a new transtype option which points to your plugin transtype. Add a new propertyfile option which points to your DITA Open Toolkit property file
    <?xml version="1.0" encoding="UTF-8"?>
    <pipelineConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="cpnz:pipeline:xsd:pipeline-configuration.xsd">
        <pipeline>ditaot-html5</pipeline>
        <options>
          <option>
            <name>transtype</name>
            <value>custom-html5</value>
          </option>
          <option>
            <name>propertyfile</name>
            <value>alfresco:/Sites/my-sample-site/documentLibrary/dita-ot.properties</value>
          </option>
    ...
  6. Save your changes.
  7. Test your pipeline configuration on a sample ditamap file.
The HTML5 output should be using your plugin customization.
Note: The list of available DITA OT pipelines that you can chose as your pipeline element is the following:
ditaot-dita
ditaot-eclipsehelp
ditaot-html5
ditaot-htmlhelp
ditaot-markdown
ditaot-markdown_gitbook
ditaot-markdown_github
ditaot-pdf
ditaot-xhtml