Skip to main content

Documentation as Code

DaC (Documentation as Code) is an approach of treating documentation like code so that documentation and code are created and maintained together.

Docs as Code principles include the following:

  • Docs are part of the Version Control (Git).
  • The underlying syntax is Markdown.
  • Docs can be the subject of code reviews, automated tests, and the CI process.

The Docs as code approach gives developers the benefits of a more streamlined process.

Docs as Code & Swimm​

Swimm saves all documentation as code, which means that Swimm Docs are as easy to read as Markdown files.

A simple and typical editing workflow looks like this:

  1. A developer commits changes.
  2. Swimm detects that as a result of code changes, some documents need to be amended and notifies the developer.
  3. The developer then accesses these docs and either automatically approves Swimm’s Auto-sync corrections, or decides to further edit the doc.
  4. Once done, developers commit the changes as part of the PR.

This document is automatically kept up to date using Swimm.