Implementing Docs as Code

Background

Our documentation system previously relied on a commercial XML source control, authoring, and publishing suite.
The workflow included XML-based authoring in an editor and publishing HTML/PDF outputs using a dedicated publishing pipelines.

While the system was robust and feature-rich, it introduced limitations:

To address these issues, a new Docs as Code strategy was designed, leveraging open-source tools, version control, and cloud delivery pipelines.

Strategy Overview

The goal was to unify tools, reduce dependencies, and bring full control of the documentation workflow in-house utilizing the same principles, tools, and workflows as software code.

Example Workflow Diagram

%%{init: {'theme':'base', 'flowchart': {'layout': 'elk'}}}%% flowchart LR A(["XML Source Files in Git"]) -- "DITA-OT Markdown Export" --> B["Markdown Files"] B -- Pandoc --> C["RST Index Files"] C -- Sphinx Build --> D["Custom HTML/CSS Theme"] C2(["Docs metadata in JSON"]) -- "script to inject meta to HTMLs" --> D D -- Deploy --> E["Object Storage Bucket"] E -- CDN Distribution --> F["End Users"]

Two approaches were considered:

Option 1 – Direct HTML generation with DITA-OT

Option 2 – XML to Markdown, then Markdown to HTML with Sphinx

Decision: The second option was chosen for its simplicity, transparency, and ease of integrating automation.

Final Implementation

1. Converting XML to markdown

dita --input=my_ditamap.ditamap --format=markdown --output=./output_folder

2. Preparing Sphinx inputs

pandoc --from=markdown --to=rst --output=output.rst input.md

3. Rendering HTMLs with Sphinx

4. Injecting metadata to HTMLs

5. Hosting and distribution

Benefits

Learning

What’s Next

References

Keywords

Adobe Experience Manager Adobe FrameMaker Robohelp EasyDita Oxygen XML editor ArborText XML Editor gitlab XML XSLT Markdown RST AsciiDoc mermaid charts DITA DITA-OT pandoc Sphinx Python JavaScript docops CICD vibecoding GenAI AWS S3 cloudfront distributed cloud WAF DNS version control Docs-as-Code Content Delivery Network Content Management System technical writing customer documentation customer communications


Schedule a meeting