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.13.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a96edf513d91f4d7ac733f99b7ebb70b7b933536b157e8a99f77ad9e85f6f61 |
|
MD5 | a85078a3834a986a10ec29eaad30880d |
|
BLAKE2b-256 | 90bc06d72868e441ebacb6e9655a74e68ff473492a1eedacad358a0f0e774909 |
Hashes for sphinx_codeautolink-0.13.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af4d8715dbc06fd7fa4398c7820098d8abdc8567af2a47550cad661dc48533f2 |
|
MD5 | a8712995e11e7418c19a444b0fac191d |
|
BLAKE2b-256 | 460ed0bf7759ce3891489d4deffb6ebb6ce0d9673a8ff73a3e7b49150480ceac |