Glossary · 3 · Publishing SDKs and structured content
Docs as code
Also known as: Documentation as code, Docs-as-code
In technical communication, docs as code is the practice of writing and maintaining documentation with the same tools and workflows as software source code: plain-text markup, version control, issue trackers, code reviews and automated builds and tests.
- Publishing SDK
- Technical documentation
In one sentence
Docs as code treats documentation like source code: plain-text markup, version control, reviews and automated builds and tests.
Example
Writers keep an SDK's guides as Markdown files in the same Git repository as the code; each pull request is reviewed by an engineer and the CI pipeline builds the site and runs the code samples.
How it applies
- Publishing SDKs: Docs as code turns the publishing toolchain into a build step. Static site generators, DITA-OT or other publishing engines run from the command line in continuous integration (CI), so every change produces a preview and every release a reproducible build.
- The workflow: Write the Docs describes the practice as writing documentation with the same tools as code: issue trackers, version control (for example Git), plain-text markup (Markdown, reStructuredText, AsciiDoc), code review and automated tests, following the same workflows as development teams.
- Developer SDKs: SDK documentation is a natural fit: reference docs generated from the code, guides next to the code, samples compiled and run in the same pipeline, and a pull request that changes an API can be required to update its documentation.
- Structured content: Docs as code is a workflow, not a format. It works with lightweight markup and with XML such as DITA; with DITA the build adds schema validation and link checks.
- Limits: Review, approval and release records still have to be defined; a merged pull request is a technical event, not by itself an editorial or legal release of the content.
Docs as code vs. CCMS-based authoring
A component content management system manages content units, their versions, reuse and workflow in a database with its own editor. Docs as code manages files in a repository with developer tools. Many organizations combine them, for example by storing DITA in Git and publishing through CI.
External references
- Write the Docs: Docs as Code