How to customize a standard plugin of the DITA-OT Server creating a new plugin

You can customize any DITA-OT plugins using a new plugin. Explanation defined here are customizing the default DITA Open Toolkit HTML5 output plugin.

You can customize the default HTML5 output by providing to the DITA-OT Server a plugin which contains your custom stylesheets and CSS. Using Alfresco Share interface you can run this output processing and include standard transformation parameters through the use of pipeline options.

  1. Creates an HTML5 plugin into the plugins folder located in your DITA-OT Server installation.
    The plugin needs to have a new transtype (ex. custom-html5).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 (or dita.bat --install, on a windows server).
  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-OT 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