With the prioritisation of speed, collaboration, and automation in the Agile software development environment, this approach naturally emerged to meet the need for always up-to-date and integrated documentation that goes hand in hand with software development.
Docs as Code is an approach to creating software documentation using the same tools and processes as for writing code. Generally speaking, it’s about treating documentation similarly to code.
Documentation following the Docs as Code approach uses the same source control as for the code (usually, git) and resides either in the same repository as code (preferably) or in a separate one.
In contrast to binary formats (like Microsoft Word or Adobe FrameMaker) and markup previously mostly used for documentation, the documents following the Docs as Code approach are created using plain text formats like markdown, reStructured Text, or AsciiDoc. These don’t require any specific tools – just any text editor, like VS Code, Sublime Text, or simply the one preferred by the development team. The only thing an Information Developer needs to select is a static site generator (SSG) to compile the final output.
Depending on the product needs, content structure, and the final output, this can be:
The idea of the Docs as Code approach is to introduce synergy and collaboration in the development team, making documentation available and understandable to anyone who is willing to contribute, at the same time, preserving rules and standards and making it consistent.
This approach requires Information Developers (Documentation Engineers) to work closely with DevOps and Software Developers to integrate documentation into the development pipeline, including CI/CD setup to build target files.
Additionally, with the Docs as Code approach, documentation quality checks can be automated by adding linters (e.g., Vale, markdownlint, etc.) to the documentation development pipeline. Thus, the process becomes even more streamlined, making sure that the documentation is consistent in style, formatting and terminology, grammatically correct, and does not contain any technical issues like broken links.
What’s great about the Docs as Code approach is that it allows following the usual code review process for documentation, engaging SMEs not only to contribute to documentation, but also to validate and approve the written chunks of content before they are published. This is done as a part of the usual development process, without the need to set up extra calls, contact SMEs multiple times, or escalate the need for review before publishing.
With all this, documentation following the Docs as Code approach makes updates fast and automates publishing.
According to the Docs as Code philosophy, the approach works no matter the number of people contributing to the documentation. However, you should be aware from the start that the more people start contributing to documentation, the more well-thought-out the documentation process set up should be. You need to think well on the following aspects to make your project benefit from the Docs as Code approach rather than struggle with it:
With all considerations in place, Docs as Code approach works as a charm in software teams, making documentation fully synchronised with the development process, keeping it as an inseparable part and feature of a product rather than a strange citizen who is always late.
Docs as Code is an approach where documentation is written, versioned, and maintained using the same tools and workflows as software code, such as git, plain text editors, and CI/CD pipelines.
No, Google Docs is not suited for Docs as Code because it doesn’t support version control, integration with code repositories and common statis site generators, or automated publishing processes.
Creating documentation according to Docs as Code typically involves writing content in plain text formats (e.g., markdown), storing it in git repository with the code, using branches and pull requests for edits and reviews, and publishing using static site generators.
It enables collaboration, version control, automation, continuous integration, and keeps documentation in sync with software development.
The breadth of knowledge and understanding that ELEKS has within its walls allows us to leverage that expertise to make superior deliverables for our customers. When you work with ELEKS, you are working with the top 1% of the aptitude and engineering excellence of the whole country.
Right from the start, we really liked ELEKS’ commitment and engagement. They came to us with their best people to try to understand our context, our business idea, and developed the first prototype with us. They were very professional and very customer oriented. I think, without ELEKS it probably would not have been possible to have such a successful product in such a short period of time.
ELEKS has been involved in the development of a number of our consumer-facing websites and mobile applications that allow our customers to easily track their shipments, get the information they need as well as stay in touch with us. We’ve appreciated the level of ELEKS’ expertise, responsiveness and attention to details.