e.g., Markdown, ReStructuredText, Asciidoc, LaTex
by Sean Marquez (& contributors)
Docs are up-to-date
Docs are easy to navigate
Docs are easy to maintain
Docs are not up-to-date
Docs are hard to navigate
Docs are hard to maintain
Documentation as Code (Docs as Code) refers to a philosophy that you should be writing documentation with the same tools as code.
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
Language
Toolchain
Methodology
Markup language used to write the docs
e.g., Markdown, ReStructuredText, Asciidoc, LaTex
Template language, a superset of a markup language, used to format the docs
e.g., Liquid, Jinja2, Handlebars
Source language of the toolchain used to render the docs
e.g., Ruby for Asciidoctor, Python for Sphinx
Issue Tracker
e.g., Jira, GitHub, GitLab
Conversion Engine / Static Site Generator
e.g., Sphinx, Asciidoctor, Hugo
Distributed version control system
e.g., git
CI/CD service & publishing platform
e.g., TravisCI, GitHub Actions | GitHub Pages, ReadTheDocs, Netlify
Some publishing platforms have CI/CD services built-in
Docs-Driven-Development
Write your docs first, then implement what you documented
Agile Development Practice
e.g., scrum, kanban
Code (Docs) Reviews
Have someone review your docs (e.g., as a pull request on GitHub)
NodeJS
https://github.com/nodejs/nodejs.org
SoCal Linux Expo A/V Team
https://github.com/socallinuxexpo/scale-av-web/
This presentation!
https://github.com/capsulecorplab/docs-as-code
With a sufficient number of users of an API, it does not matter what you promise in the contract; All observable behaviors of your system will be depended on by somebody. - Hyrum’s Law