Extensions

Built-in extensions

sphinx.ext.autodoc

Integrate documentation from docstrings

sphinx.ext.autosummary

generates summaries of functions, methods and attributes from docstrings

sphinx.ext.autosectionlabel

references section using the title

sphinx.ext.graphviz

Rendering of Graphviz graphs

sphinx.ext.ifconfig

includes content only under certain conditions

sphinx.ext.intersphinx

allows the linking of other project documentation

sphinx.ext.mathjax

Rendering via JavaScript

sphinx.ext.napoleon

Support for NumPy and Google style docstrings

sphinx.ext.todo

Support for ToDo items

sphinx.ext.viewcode

adds links to the source code of the Sphinx documentation

Third-party extensions

nbsphinx

Jupyter Notebooks in Sphinx

jupyter-sphinx

allows rendering of Jupyter interactive widgets in Sphinx.

Breathe

ReStructuredText and Sphinx bridge to Doxygen

numpydoc

NumPy’s Sphinx extension

Releases

writes a changelog file

sphinxcontrib-napoleon

Napoleon is a pre-processor for parsing NumPy- and Google-style docstrings

sphinx-autodoc-annotation

use Python 3 annotations in sphinx-enabled docstrings

sphinx-autodoc-typehints

Type hints support for the Sphinx autodoc extension

sphinx-git

git-Changelog for Sphinx

Sphinx Gitstamp Generator Extension

inserts a git datestamp into the context

sphinx-intl

Sphinx extension for translations

sphinx-autobuild

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

Sphinx-Needs

allows the definition, linking and filtering of need-objects, for example requirements and test cases

Sphinx-pyreverse

generate a UML diagram from python modules

sphinx-jsonschema

display a JSON Schema in the Sphinx documentation

Sphinxcontrib-mermaid

allows you to embed Mermaid graphics in your documents.

Sphinx Sitemap Generator Extension

generate multiversion and multilanguage sitemaps for the HTML version

Sphinx Lint

based on rstlint.py from CPython.

sphinx-toolbox

Toolbox for Sphinx with many useful tools.

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.

Own Extensions

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

import sys
import os
sys.path.insert(0, os.path.abspath('exts'))

extensions = [
    'foo',
    ...
    ]