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.
-
Creates an HTML5 plugin into the
plugins
folder located in your DITA-OT Server installation.
-
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).
-
Connect to the Alfresco Share interface.
-
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.
-
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>
...
-
Save your changes.
-
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