This is a DITA-OT Plug-in which creates a set of output files suitable to create a
ReadTheDocs Documentation Project. The transform is an extension of the existing DITA-OT
markdown plug-in (org.lwdita
) and creates a well-formatted mkdocs.yaml
file
site_name: "ReadTheDocs Plug-in"
pages:
- Home: index.md
- "ReadTheDocs":
- "Examples": "topics/examples.md"
- "Full list of features": "topics/features-full.md"
- "Basic usage": "topics/basic-usage.md"
theme: mkdocs
Table of Contents
The ReadTheDocs Plug-in for DITA-OT has been tested against DITA-OT 4.x. It is recommended that you upgrade to the latest version.
The ReadTheDocs Plug-in for DITA-OT is a plug-in for the DITA Open Toolkit.
-
Full installation instructions for downloading DITA-OT can be found here.
- Download the
dita-ot-4.0.zip
package from the project website at dita-ot.org/download - Extract the contents of the package to the directory where you want to install DITA-OT.
- Optional: Add the absolute path for the
bin
directory to the PATH system variable. This defines the necessary environment variable to run thedita
command from the command line.
- Download the
curl -LO https://github.com/dita-ot/dita-ot/releases/download/4.0/dita-ot-4.0.zip
unzip -q dita-ot-4.0.zip
rm dita-ot-4.0.zip
- Run the plug-in installation command:
dita install https://github.com/jason-fox/fox.jason.readthedocs/archive/master.zip
The dita
command line tool requires no additional configuration.
Like any other transform, when invoked directly, the ReadTheDocs transforms require an input document
To create the files for a ReadtheDocs project, use the readthedocs
transform, set the --input
parameter to point to
a *.ditamap
file:
PATH_TO_DITA_OT/bin/dita -f readthedocs -i document.ditamap
To create the files for a DITA-OT project, use the mkdocs2dita
transform and set the --input
parameter to point to a
mkdocs.yml
file:
PATH_TO_DITA_OT/bin/dita -f mkdocs2dita -i mkdocs.yml
args.css
- Specifies the name of a custom.css
file. The css is added to themkdocs.yml
file asextra_css
args.csspath
- Specifies the location of a copied.css
file relative to the output directory.args.cssroot
- Specifies the directory that contains the custom.css
file.args.readthedocs.theme
- Specifies atheme
to style the ReadTheDocs output (default:readthedocs
)args.readthedocs.template
- Specifies a templatemkdocs.yml
file to use - the template can hold additional readthedocs attributes which are not generated by the transform.args.readthedocs.use.pages
- Specifies whether to usepages
rather thannav
(defaultno
)
PRs accepted.
Apache 2.0 © 2019 - 2022 Jason Fox