Workaround for DITA

In a post from 2016 @timskitour asked about an external helper for DITA XML. The answer was: convert your XML to a format that Hugo supports. For me, Markdown (MD) works best because most of our docs are in MD and HTML needs more post-editing. Thus, I use the latest version of the DITA Open Toolkit (OT), which is 4.0.2.

The ditac of XML Mind does not do the MD conversion. That is unfortunate, because ditac is easier to customize than the OT. For details, refer to DIY DITA output customization.

The OT does not treat the stepexpand elements (, ) in the same manner as the HTML5 conversion.

I do not use the markdown_github conversion, because it ignores .

After the DITA to MD conversion, I need to post-edit the MD.

  1. Add MD frontmatter.
  2. Add comment to the frontmatter to say that the source is DITA XML.
  3. Edit the stepexpand elements.
  4. Edit the image references to the static folder of Hugo.

What are your experiences with publishing DITA content in Hugo?