A Sphinx extension to insert code snippets from a git repository, helping you to keep a repository of versions working code examples.
Install this extension from PyPI:
pip install sphinxcontrib-gitinclude
The extension requires Sphinx 3.7.0 or later and Python 3.7 or later.
Just add this extension to
extensions = ['sphinxcontrib.gitinclude']
Now you can use a new directive
insert code from a git repository.
For more information on how to use this project see the example directory with a project that uses this directive.