DITA Bootstrap Extension

A plug-in for DITA Open Toolkit that extends the DITA Bootstrap HTML output with additional features from the Bootstrap Extension library.

Installing

Use the dita command to add the plug-ins to your DITA Open Toolkit installation:

  1. Optional: install the specialization plug-ins to add support for new DITA elements that generate Bootstrap Extension components:

    dita install org.dita-bootstrap.specialization
    dita install org.dita-bootstrap.specialization.extension
  2. For HTML generation, install the CSS plug-in and the HTML plug-in as shown:

    dita install fox.jason.extend.css
    dita install org.dita-bootstrap.html
    dita install org.dita-bootstrap.extension
  3. To add syntax highlighting using the Bootstrap color scheme, install the Prism.js plug-in if required:

    dita install fox.jason.prismjs

  1. Optional: install the specialization plug-in to add support for new DITA elements that generate Bootstrap components:

    dita --install org.dita-bootstrap.specialization
    dita --install org.dita-bootstrap.extension.specialization
  2. For HTML generation, install the CSS plug-in and the HTML plug-in as shown:

    dita --install fox.jason.extend.css
    dita --install org.dita-bootstrap.html
    dita --install org.dita-bootstrap.extension
  3. To add syntax highlighting using the bootstrap color scheme, install the Prism.js plug-in if required:

    dita --install fox.jason.prismjs

  1. Optional: install the specialization plug-in to add support for new DITA elements that generate Bootstrap components:

    dita --install https://github.com/dita-bootstrap/dita-bootstrap.specialization/archive/master.zip
    dita --install https://github.com/dita-bootstrap/dita-bootstrap.extension.specialization/archive/master.zip
  2. For HTML generation, install the CSS plug-in and the HTML plug-in as shown:

    dita --install https://github.com/jason-fox/fox.jason.extend.css/archive/master.zip
    dita --install https://github.com/dita-bootstrap/dita-bootstrap.html/archive/master.zip
    dita --install https://github.com/dita-bootstrap/dita-bootstrap.extension/archive/master.zip
  3. To add syntax highlighting using the bootstrap color scheme, install the Prism.js plug-in if required:

    dita --install https://github.com/jason-fox/fox.jason.prismjs/archive/master.zip

Using

If using DITA specialization for the Bootstrap Extension, ensure that the *.dita files are using the following DOCTYPE declaration:

<!DOCTYPE topic PUBLIC "-//Infotexture//DTD DITA Bootstrap Extension Topic//EN" "bootstrap-ext-topic.dtd">

Specify the html5-bootstrap format when building output with the dita command:

dita --input=path/to/your.ditamap --format=html5-bootstrap

Optional elements

The optional toTop button can be included with the following parameter:

  • to-top.include – add a toTop button that scrolls to the top of the page

Common Bootstrap utility classes

The HTML output can be annotated with common Bootstrap utility classes using additional command line parameters:

  • bootstrap.css.to-top – common Bootstrap utility classes for the toTop button