Docs-as-code: what actually changes
Version control, review and automation change how documentation teams work.
On this page
Treating documentation like code is less about tools and more about habits. I write in Markdown, work in Git branches and have review and checks run on every change, and the habits are what made the difference, not the software.
What changes#
- History. Every edit is recorded and can be reversed. “Who changed this and why?” has an answer.
- Review. Changes are discussed in the open before they ship, so a second person catches what the author cannot see.
- Automation. Checks run on every change, such as broken links, style rules and a preview build, so reviewers spend their time on meaning rather than typos.
- Shared ground with engineers. Docs live in the same kind of workflow as the product, which makes it easier to ask for a fix, or to make one yourself.
What doesn’t#
Good documentation still needs a clear audience and a reason to exist. A pull request will not tell you that a page is solving the wrong problem. The workflow only makes the work easier to share and safer to change.
It also has a cost. Writers who have never used Git need support, and a workflow that is too strict can put people off contributing. I try to keep the process as light as the team can handle.
Where to start#
Put your docs in a repository, write in Markdown and ask for a review on every change. Add automated checks later, one at a time, only when you feel the need.
See also the curse of knowledge for why review matters.