Documentation as Code
Documentation as code applies software engineering practices — version control, code review, automated testing, and CI/CD — to technical documentation. Writers use plain-text formats stored in repositories, building and deploying docs through the same pipelines as application code.
itTechnical communication and collaboration | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — Documentation as Code
Documentation as code is a way of producing documentation through the same sort of controlled change path used for software. The name sounds as though prose has been issued a small compiler and a security badge. It has not. The point is more useful: the explanation a reader sees should have a traceable route from a source change to published output.
The route begins with a reader need, not with Markdown performing interpretive dance. An issue states why a page must change. A branch holds the proposed source. A commit records a coherent step, and a diff shows the additions and removals. A pull request then gathers the conversation, checks, and decision around that change.
The important split is between source, which authors edit, and generated output, which a build creates for readers. A static site generator can turn Markdown, configuration, and assets into a site. Editing that generated site directly is like correcting a receipt and expecting the shop's ledger to agree. The next build can erase the edit, and the history no longer explains what readers received.
Automation is the useful but limited robot in this arrangement. It can check markup, links, configuration, selected prose rules, and sometimes examples. A successful build proves that the source can become an artifact. It does not prove that the artifact is accurate, navigable, or helpful. Technical review checks behavior and examples; editorial review checks clarity and structure; accessibility review checks whether meaning survives beyond a convenient visual path. One person can wear several hats, though the hats should still be named.
The surprise is that the repository is not an information architect. It will faithfully build a tutorial, a how-to guide, reference, or explanation, including a very polished wrong-shaped page. The Diátaxis model separates those content types so that a reader looking up an exact fact does not receive a guided lesson with a party hat attached.
Documentation can sit with product code or in its own repository. Either can work when the version, ownership, and release connection is explicit. The harder limit is contribution friction: Git and plain-text markup may discourage the expert with the missing fact. Browser editing, templates, previews, and editorial pairing are part of the production system, not signs that the system has failed its entrance exam.
Read the introduction for the full evidence chain, the slides for the flow and decisions, and the cheatsheet when you need the review and automation map. The quiz checks the distinctions. The practice reference and exercise turn one small documentation change into something a reviewer can actually inspect. That is the whole trick, which is fortunate because the build server has already asked for a coffee break.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.writethedocs.org/guide/docs-as-code/
Supports
- Documentation as code as a philosophy of using development tools for documentation
- Issue trackers, version control, plain-text markup, code review, and automated tests as defining tools
- Shared ownership and closer integration between writers and development teams
- https://docs.gitlab.com/development/documentation/workflow/
Supports
- Planning documentation requirements with product work
- Technical, technical-writing, and maintainer review responsibilities
- Timing and visibility benefits of including documentation with related code
- Separate commits for a content move and subsequent content edits
- Documentation-specific continuous integration pipelines and documentation as part of definition of done
- https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
Supports
- Pull requests as proposals to collaborate on changes from one branch to another
- Branch comparison and review before changes enter a target branch
- https://docs.github.com/en/get-started/start-your-journey/hello-world
Supports
- Branch, commit, pull-request, diff, review, and merge concepts in a basic GitHub flow
- Markdown as a text format used for repository documentation
- https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks
Supports
- Required status checks as merge gates on protected branches
- Successful current results as evidence required before merge
- Skipped, stale, or mismatched checks as possible causes of blocked changes
- https://www.mkdocs.org/
Supports
- Markdown documentation source with YAML configuration
- Local preview through a development server
- Static HTML output that can be hosted on several platforms
- A concrete separation between editable source and generated site output
- https://docs.vale.sh/
Supports
- Vale as code-like linting for prose
- Configurable rules focused on editorial style and consistency
- Markup-aware handling and the limits of a prose linter as a writing aid
- https://vale.sh/docs/cli
Supports
- Vale command-line use and configuration overrides
- Exit status one when linting errors are found
- Nonzero lint results as a mechanism suitable for failing continuous integration
- https://vale.sh/docs/styles
Supports
- YAML rule files and styles as Vale's configurable enforcement system
- Rule severity and targeted prose checks
- https://diataxis.fr/
Supports
- Tutorials, how-to guides, reference, and explanation as distinct documentation types
- Reader learning and working needs as the basis for choosing a content type
- https://developers.google.com/style/accessibility
Supports
- Descriptive headings, meaningful link treatment, and logical structure
- Text alternatives that summarize the intent of informative images
- Documentation meaning preserved without images, color, position, sound, or punctuation alone
- Keyboard access and human testing alongside authoring guidance
- https://daringfireball.net/projects/markdown/
Supports
- Markdown 1.0.1 was available on 17 December 2004
- Markdown converts readable plain text into structurally valid HTML
- https://www.sphinx-doc.org/en/master/changes/0.1.html
Supports
- Sphinx 0.1 had its first public release on 21 March 2008
- Early Sphinx releases built HTML and LaTeX output from documentation source
- https://docs.readthedocs.io/en/stable/about/history.html
Supports
- Read the Docs began in 2010 and developed hosted documentation builds from version-controlled source
- https://github.com/mkdocs/mkdocs/releases/tag/0.8
Supports
- MkDocs 0.8 was released in 2014 as a documentation site generator using Markdown files and configuration
- https://github.com/facebook/docusaurus/releases/tag/v1.0.0
Supports
- Docusaurus 1.0.0 was released in 2017 as a documentation-site generator
- https://diataxis.fr/history/
Supports
- Diátaxis documented the framework's development and public publication history
- https://engineering.squarespace.com/blog/2025/making-documentation-simpler-and-practical-our-docs-as-code-journey
Supports
- Squarespace describes versioning documentation with code, reviewing both through pull requests, CI/CD publishing, contribution friction, and preview environments
- https://github.com/
Supports
- GitHub provides repository hosting and pull-request review used in documentation-as-code workflows
- https://about.gitlab.com/
Supports
- GitLab provides repository hosting, merge requests, and CI/CD used in documentation-as-code workflows
- https://bitbucket.org/
Supports
- Bitbucket provides Git repository hosting and pull-request workflows
- https://azure.microsoft.com/products/devops/
Supports
- Azure DevOps provides Git repositories, pull requests, and pipelines
- https://readthedocs.org/
Supports
- Read the Docs builds and hosts documentation from version-controlled projects
- https://gitbook.com/
Supports
- GitBook supports GitHub and GitLab synchronization for docs-as-code workflows
- https://docusaurus.io/
Supports
- Docusaurus is a documentation-site generator for version-controlled documentation source
