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 following sources:
$ pip install sphinx-codeautolink
# or, alternatively:
$ conda install -c conda-forge 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.14.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c06ea6bf407230ab33947f32e3755940a395d7753f65880baf003908b3c597f |
|
MD5 | 0928943ac663508a4608e45f3813fdb4 |
|
BLAKE2b-256 | 7972dc9843c6fe29495ae1f2bd0a2e951ec1d9aece988dfaa93cba4feb345e65 |
Hashes for sphinx_codeautolink-0.14.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd2b1348b1f0815353b90981090dfe73d6fac3b9d4e3b185d92a3653df1b6d8f |
|
MD5 | 6efc56e9ecfa2fb960120e5fa4d7c79a |
|
BLAKE2b-256 | 2302f146340dc78cd60cab581fc9c5279e553a8e36f53ec4216d6affdd534756 |