https://github.com/ousttrue/sphinxcontrib-gitinclude
literalinclude from git repository
https://github.com/ousttrue/sphinxcontrib-gitinclude
Last synced: about 2 months ago
JSON representation
literalinclude from git repository
- Host: GitHub
- URL: https://github.com/ousttrue/sphinxcontrib-gitinclude
- Owner: ousttrue
- License: mit
- Created: 2021-10-18T10:32:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-28T11:51:26.000Z (over 4 years ago)
- Last Synced: 2025-12-31T10:07:18.193Z (6 months ago)
- Language: Python
- Size: 218 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sphinxcontrib-git_include
`literalinclude` from git repository.
* using ~~`git cat-file -p {rev}:{path_to_file}`~~
* using `git show {rev}:{path_to_file}`
## install
```
> pip install gitinclude
```
## Sample
### Sphinx: conf.py
```py
extensions = [
"gitinclude",
]
```
### Sphinx: usage
`myst`
```
``{gitinclude} HEAD^ gitinclude/__init__.py
:language: python
:linenos:
``
```