I would strongly suggest taking a look at the Sphinx document generator tool chain.
The document creation is performed as a set of ReStructuredText files, (with the possible inclusion of some other formats such as markdown), that are completely compatible with version control systems such as git, svn, mercurial, etc. Templates can be used to give a consistent style to the final, published, document.
The final document can be generated in multiple formats and some sites such as ReadTheDocs will automatically generate your documents in response to new commits & releases (see here) to your or your teams repository on sites such as GitHub, Bitbucket or GitLab.
- Free, Gratis & Open Source
- Cross Platform (Written in Python)
- Input files are fully version control compatible
- Output formats: HTML (including Windows HTML Help), LaTeX (for printable PDF versions), ePub, Texinfo, manual pages, plain text
- Extensive cross-references: semantic markup and automatic links for functions, classes, citations, glossary terms and similar pieces of information
- Hierarchical structure: easy definition of a document tree, with automatic links to siblings, parents and children
- Automatic indices: general index as well as a language-specific module indices
- Code handling: automatic highlighting using the Pygments highlighter which handles most, (>300), programming languages.
- Multiple, good looking, themes available either as build-in themes, (about 8), downloads from places like PyPi, GitHub & sphinx-themes.org or by writing your own.