Sphinx Devhelp Extension
sphinxcontrib-devhelp is a Sphinx extension that generates Devhelp documents (a documentation format used by the GNOME desktop environment) alongside standard HTML documentation. It is currently at version 2.0.0 and typically aligns its major releases with those of Sphinx itself, ensuring compatibility with the latest Sphinx features and Python versions.
Warnings
- breaking Version 2.0.0 (and Sphinx 2.0.0 which it follows) dropped support for Python 2.7, Python 3.4, and Docutils 0.11. This extension now requires Python >=3.9.
- breaking Prior to Sphinx 2.0.0, `sphinxcontrib-devhelp` was often bundled directly with Sphinx. With Sphinx 2.0.0 and later, it became a separate, explicitly installable package.
- gotcha Generating Devhelp documents requires invoking the dedicated `devhelp` builder. Standard `html` builds will not produce Devhelp output.
- gotcha After building, the generated Devhelp documents are not automatically registered with the Devhelp application. They need to be manually linked or placed in a specific directory for Devhelp to find them.
Install
-
pip install sphinxcontrib-devhelp
Imports
- sphinxcontrib.devhelp
extensions = ['sphinxcontrib.devhelp']
Quickstart
# conf.py
# ... (other Sphinx configurations)
# Add 'sphinxcontrib.devhelp' to your extensions list
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinxcontrib.devhelp',
]
# Optional: Configure the basename for the Devhelp output
devhelp_basename = 'MyProjectDevhelp'
# Build from terminal
# In your Sphinx project's root directory:
# sphinx-build -b devhelp doc/source doc/build/devhelp