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.15.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4f88aa4a315ee26c8c1d7ffc11b3759764fadf7d8f0a861d780d4423eff93e6 |
|
MD5 | 619afb4a57da0becf56c7f982ffe8091 |
|
BLAKE2b-256 | 98d1eb1f07c175a4498105ea06bcd36cdb727846f0da1089b2e3a4f0060097b8 |
Hashes for sphinx_codeautolink-0.15.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5e9d1c41463af31216aaaed3be149c2122b338bd0cfe87292ac47c970189986 |
|
MD5 | 22329a1481df102d4902319a528c1279 |
|
BLAKE2b-256 | 8fbbc36ed9dbe5776d22f76589705e4513b91649bfa725c571ecb10f0e43bdde |