Your technical writing resource

Docs as Code

The “docs as code” approach involves generation of final documentation outputs from source files, using tools known as static website generators. The workflow used in this approach mirrors the one that is used to write, review and deploy code, including the use of git to manage source files and versioning.

Here are some of the most popular static website generators used for documentation:

MkDocs is a static site generator whose primary purpose is generation of software documentation. It uses documentation source files written in Markdown and YAML configuration files. It is widely used and has an active and vibrant community of users and contributors to its themes and plugins libraries, it is easy to customize and produces a fully static HTML sites that can be hosted anywhere.

Website: mkdocs.org

Docusaurus is another documentation-specific static site generator developed by Meta Open Source. It takes source content written in Markdown/MDX, is built using React and has out-of-the-box support for translation, versioning and documentation search using Algolia as the search provider.

Website: docusaurus.io

Jekyll is a static site generator that works for many types of static content, including blogs and documentation websites. It takes Markdown or Textile as its source files and uses the Liquid templating engine to process templates. It has an active and responsive user base and a number of available templates and plugins. The showcase of documentation website created using Jekyll includes some famous names among tech companies.

Website: jekyllrb.com

Sphinx is a Python-based documentation generator that can produce web pages, but also formats such as printable PDFs, documents for e-readers (ePub) and man pages. It takes reStructuredText (rST) or Markdown sources. It is used by major Python libraries such as DjangoNumPySciPyScikit-LearnMatplotlib, and there is a number of available first and third-party extensions.

Website: sphinx-doc.org

Hugo is an open-source static site generator written in Go, claiming incredible generation speeds of less than 1 ms per page. It is multi-purpose and can be used to create various types of websites other than documentation. It takes Markdown files as its input and has a library of over 300 themes that can be used for the output. Supported integrations include Disqus for comments, Google Analytics and others.

Website: gohugo.io