Fork me on GitHub

Code documentation lesson

In this lesson we will discuss different solutions for implementing and deploying code documentation. We will learn how to build documentation with the documentation generator Sphinx and how to deploy it to Read the Docs, a service which hosts open documentation for free.

This demonstration will be independent of programming languages and relevant also for your Fortran, C, C++, R, or Matlab projects. We will also learn how to deploy a project website to GitHub Pages. The approach that we will learn will be transferable to GitLab Pages and Bitbucket Pages.


  1. Basic understanding of Git.

  2. You need a GitHub account.

  3. You need a Read the Docs account.

  4. You need to have Sphinx installed (as part of your Python environment installation).


13:00 Motivation Why is code documentation important?
13:05 Specs and requirements What requirements and specifications can we impose on a good documentation?
13:15 Popular tools and solutions What tools are out there?
What are their pros and cons?
13:25 Sphinx and ReStructuredText How do we get started on writing Sphinx documentation in RST?
13:45 Deploying Sphinx documentation to Read the Docs How do Python projects deploy their documentation?
Can we use their solutions for projects which do not use Python?
14:05 Deploying a project website or homepage to GitHub Pages How can we have a good-looking project website without hosting it ourselves?
14:25 Recommendations What recommendations can we take home?
14:30 Finish