sphinx-rtd-dark-mode is a Sphinx extension that adds a toggleable dark mode to the Read the Docs Sphinx theme. Currently at version 1.3.0, it receives periodic updates to enhance styling, fix visual bugs across various Sphinx elements, and improve user experience.
pip install sphinx-rtd-dark-modeVerified import paths — ran on the pinned version, not inferred.
To enable sphinx-rtd-dark-mode, first ensure you have `sphinx` and `sphinx-rtd-theme` installed. Then, add `'sphinx_rtd_dark_mode'` to the `extensions` list in your `conf.py` file. Optionally, set `default_dark_mode = False` if you prefer the light theme on the first load.
Ensure `html_theme = 'sphinx_rtd_theme'` is set, or be aware the extension will set it for you.
Set `default_dark_mode = False` in `conf.py` if you prefer users to start in light mode.
Upgrade to version 1.1.1 or later (`pip install --upgrade sphinx-rtd-dark-mode`).
Ensure you are using the latest version (1.3.0+) for the most comprehensive styling fixes: `pip install --upgrade sphinx-rtd-dark-mode`.