sphinxcontrib-gitinclude¶
A Sphinx extension to insert code snippets from a git repository, helping you to keep a repository of versions working code examples.
Installation¶
Install this extension from PyPI:
pip install sphinxcontrib-gitinclude
The extension requires Sphinx 3.7.0 or later and Python 3.7 or later.
Usage¶
Just add this extension to extensions
:
extensions = ['sphinxcontrib.gitinclude']
Now you can use a new directive gitinclude
to
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.
See example usage below:¶
Contents: