Sphinx HTML Help Builder
sphinxcontrib-htmlhelp is a Sphinx extension that generates HTML Help files (CHM) from reStructuredText sources. It is currently at version 2.1.0 and is actively maintained, receiving updates frequently, often in sync with Sphinx core releases.
Warnings
- gotcha Generating the final HTML Help (.chm) file from the Sphinx output requires the Microsoft HTML Help Workshop. This is a Windows-only tool, meaning the CHM compilation step cannot be performed on Linux, macOS, or other non-Windows operating systems.
- gotcha The HTML Help (CHM) format is an older, Windows-specific documentation format. It may not be suitable for modern web-based documentation workflows, cross-platform users, or integration with contemporary documentation platforms. Consider if this format truly meets your audience's needs.
- breaking The `sphinxcontrib-htmlhelp` library explicitly requires Python 3.9 or newer. Older Python versions are not supported.
- deprecated While the `sphinxcontrib-htmlhelp` extension itself is actively maintained, the underlying HTML Help (.chm) format has largely been superseded by web-based documentation. Depending on your target audience, using this format might limit accessibility and modern features.
Install
-
pip install sphinxcontrib-htmlhelp
Imports
- sphinxcontrib.htmlhelp
extensions = ['sphinxcontrib.htmlhelp']
Quickstart
# 1. Install the extension
# pip install sphinxcontrib-htmlhelp
# 2. In your Sphinx project's conf.py file, add 'sphinxcontrib.htmlhelp' to the extensions list:
# conf.py
# ...
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinxcontrib.htmlhelp'
]
# ...
# Optionally, configure HTML Help specific options (e.g., the output basename):
htmlhelp_basename = 'MyProjectDoc'