DITA Open Toolkit plug-in for generating a JSON file map of Resource ID values with the output html files.
- Download or clone this repository to your DITA OT
pluginsdirectory. - Run the
dita --installcommand.
Note: This plug-in requires the org.dita.html5 plug-in, which is included by default in most distributions of the DITA Open Toolkit.
Include a <resourceid> element within the <prolog> in at least one DITA topic. A JSON file will be generated in your output directory with a list of each <resourceid> element @ux-context-string value as a key and the relative path to the output HTML file.
The relative URLs in the JSON file values are relative to the input DITA map (regardless of the args.metadata-map.outdir value).
LwDITA and Markdown input are not supported, nor are the likely to be. In the case of XDITA and HDITA, it is not clear how the authors of these formats intended for a resource identifier to be included as metadata, if at all. For MDITA and Markdown, the current DITA Open Toolkit plugins (as of 4.2) do not seem to correctly parse the YAML metadata block as described in the DITA OT documentation. Further, the parsing seems limited only to the @appid attribute, not the @ux-content-string attribute which is intended for use with context-sensitive help. Thus, it seems reasonable that if a resource identifier needs to be mapped to a topic for post-processing of some sort, then using a standard DITA XML format for topics is warranted.
-
args.metadata-map.nameThe stem name of the resulting JSON file -
args.metadata-map.outdirThe name of the sub-directory of the resulting JSON file. This is relative to outputoutsub-directory.Tip: Use a value of . to place the JSON file in the
\outsub-directory.
DITA Open Toolkit Docs: Creating custom plug-ins
Refer to TODO.md for details.
Copyright © Bentley Systems, Incorporated. All rights reserved.
MIT License