Docs as Code

author:Eric Holscher & the Write the Docs community

Documentation as Code (Docs as Code) refers to a philosophy that you should be writing documentation with the same tools as code:

  • Issue Trackers
  • Version Control (Git)
  • Plain Text Markup (Markdown, reStructuredText, Asciidoc)
  • Code Reviews
  • Automated Tests

This means following the same workflows as development teams, and being integrated in the product team. It enables a culture where writers and developers both feel ownership of documentation, and work together to make it as good as possible.

Generally a Docs as Code approach gives you the following benefits:

  • Writers integrate better with development teams
  • Developers will often write a first draft of documentation
  • You can block merging of new features if they don’t include documentation, which incentivizes developers to write about features while they are fresh

There is a lot more to building a proper Docs as Code workflow. There are a couple books we recommend that you check out:

In addition, there is an open source tool-chain which shows how the docs-as-code approach can be implemented

Docs as Code at Write the Docs

Write the Docs has had a number of talks that touch on this topic over the years.

2015 North America

  • Riona MacNamara talked about how adopting Docs as Code has completely transformed how Google does documentation.

2016 North America

  • We had a panel with folks from Rackspace, Microsoft, Balsamiq, and Twitter, all talking about how they are adopting these practices.

2016 Europe

The Docs as Code concepts are widely practiced in the software industry, and are gaining adoption in the writing community.

Docs as Code at other Conferences, Video Casts and Articles

The approach has been presented at several other conferences or just video casts by different speakers.