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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93963a05f17642c8892b06932e013af62c1041a4949524c810dbc5ae8b3ff16d |
|
MD5 | 25f3074ff61d4341481f4d4544cc2b7e |
|
BLAKE2b-256 | 094ed0c9894b9dff38ad3db533479b845427e1c57cb3b8527b65259fed71a7a1 |
Hashes for sphinx_codeautolink-0.15.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44d669ad92d11fd50dd4029887ea285acd95e097cf34a9cae3c6f707c1eb4763 |
|
MD5 | 16a9a136f94eaf9822fd8804477c6124 |
|
BLAKE2b-256 | b1ef8546618a14e5a491616950b71e9e55de2877a1fecba73e4bc76c62ab53a0 |