An open API service indexing awesome lists of open source software.

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

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:
``
```