Automatic links from code examples to reference documentation.
Project description
sphinx-codeautolink makes code examples clickable by inserting links from individual code elements to the corresponding reference documentation. We aim for a minimal setup assuming your examples are already valid Python.
For a live demo, see our online documentation on Read The Docs.
Installation
sphinx-codeautolink can be installed from the Package Index via pip.
$ pip install sphinx-codeautolink
Note that the library is in early development, so version pinning is advised. To enable sphinx-codeautolink, modify the extension list in conf.py. Note that the extension name uses an underscore rather than a hyphen.
extensions = [
...,
"sphinx_codeautolink",
]
That’s it! Now your code examples are linked. For ways of concatenating multiple examples and setting default import statements among other things, have a look at the online documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sphinx-codeautolink-0.11.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eabd4dfa0cf4dcb94020506f9ea1ede0f952a54e2704b70573a643c0f327aac |
|
MD5 | b1395efd8f9073f7a349ccfe42489d25 |
|
BLAKE2b-256 | 0c65c9d694636fb06649d7e300ca2c05f8dd258b63dfb2056a261b52d44d06a1 |
Hashes for sphinx_codeautolink-0.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36a36bc434e11c1ada74a21c2a8a2b66d0751f361c28c2ee7ecd6eb434c0983f |
|
MD5 | 85b2f7fa4ee8152ca3b0e381d2f2bb9d |
|
BLAKE2b-256 | 036c3090353c283b8fe4036697d1449e40506877a2c86f4c4ad2b81f9e28b666 |