Extensions

Built-in extensions

sphinx.ext.autodoc

embeds documentation from docstrings.

sphinx.ext.autosummary

generates summaries of functions, methods, and attributes from docstrings.

sphinx.ext.autosectionlabel

references sections using the title.

sphinx.ext.graphviz

renders Graphviz graphs.

sphinx.ext.ifconfig

includes content only under certain conditions.

sphinx.ext.intersphinx

allows the inclusion of other project documentation.

sphinx.ext.mathjax

renders mathematical formulas using JavaScript.

sphinx.ext.napoleon

supports NumPy and Google Style docstrings.

sphinx.ext.todo

supports to-do items.

sphinx.ext.viewcode

adds links to the source code of the Sphinx documentation.

Third-party extensions

Breathe

ReStructuredText and Sphinx bridge to Doxygen.

Stars Contributors Commit activity Lizenz
sphinx-autobuild

monitors a Sphinx repository and generates new documentation as soon as changes are made.

Stars Contributors Commit activity Lizenz
sphinx-autodoc-typehints

support for type hints for the Sphinx autodoc extension.

Stars Contributors Commit activity Lizenz
nbsphinx

Jupyter notebooks in Sphinx

Stars Contributors Commit activity Lizenz
sphinxcontrib-mermaid

allows you to embed Mermaid graphics in your documents.

Stars Contributors Commit activity Lizenz
numpydoc

NumPy Sphinx extension

Stars Contributors Commit activity Lizenz
Sphinx-Needs

allows the definition, linking and filtering of need objects, such as requirements and test cases.

Stars Contributors Commit activity Lizenz
jupyter-sphinx

enables the rendering of interactive Jupyter widgets in Sphinx.

Stars Contributors Commit activity Lizenz
Releases

writes a CHANGELOG file.

Stars Contributors Commit activity Lizenz
Sphinx Lint

based on rstlint.py from CPython.

Stars Contributors Commit activity Lizenz
sphinx-intl

Sphinx extension for translations.

Stars Contributors Commit activity Lizenz
sphinx-jsonschema

displays a JSON Schema in the Sphinx documentation.

Stars Contributors Commit activity Lizenz
sphinx-toolbox

Toolbox for Sphinx with many useful tools.

Stars Contributors Commit activity Lizenz
Sphinx Sitemap Generator Extension

generates multiversion and multilanguage sitemaps for the HTML version.

Stars Contributors Commit activity Lizenz
sphinx-issues

creates links to GitHub or GitLab issues, pull requests and user profiles.

Stars Contributors Commit activity Lizenz
Sphinx-pyreverse

creates a UML diagram of Python modules.

Stars Contributors Commit activity Lizenz
Sphinx-Test-Reports

displays test results within Sphinx documentation.

Stars Contributors Commit activity Lizenz
Sphinx Gitstamp Generator Extension

inserts Git timestamps in context, for example in a Jinja template:

{%- if gitstamp %} Diese Seite wurde zuletzt aktualisiert am {{ gitstamp }}. {%- endif %}
Stars Contributors Commit activity Lizenz

See also

sphinx-contrib

A repository of Sphinx extensions maintained by their respective authors.

sphinx-extensions

Curated site with Sphinx extensions with live examples and their configuration.

Custom extensions

Local extensions in a project should be specified relative to the documentation. The corresponding path is specified in the Sphinx configuration file docs/conf.py. If your extension is located in the exts directory in the file foo.py, then the conf.py file should look like this:

import sys
import os

sys.path.insert(0, os.path.abspath("exts"))

extensions = ["foo", ...]