A variety of tools exist for writing, rendering, and managing documentation.
Doxygen
Doxygen is a free and open source tool that processes markup describing classes, functions, and variables in your software's header files and generates a user-friendly hyperlinked set of web pages. These web pages allow the user to navigate all the classes, functions, and variables and see 1) class hierachy relationships; 2) input and output parameters for methods and functions; and 3) other variables and associated data.
Doxygen supports many programming languages, and can also generate a LaTeX-generated PDF file.
Read the Docs
Read The Docs is a free service for hosting documentation generated from tools such as Sphinx. Read The Docs typically requires documentation to be written in either reStructuredText or Markdown, and can be configured to produce branch- or commit-specific documentation in a version control system (see What Is Version Control?).
Sphinx
Much like Doxygen, Sphinx is a free and open source tool that processes markup describing classes, functions, and variables in your software's header files and generates a user-friendly hyperlinked set of web pages. These web pages allow the user to navigate all the classes, functions, and variables and see 1) class hierachy relationships; 2) input and output parameters for methods and functions; and 3) other variables and associated data.
Sphinx supports many programming languages. Besides HTML documents it can also generate a LaTeX-generated PDF file and the e-book format EPUB.
One can also include Doxygen generated XML content into Sphinx. See the Breathe extension for details.