Sphinx extension to substitute version in references.
Project description
This extension adds a single role to Sphinx. With :version-ref:`<ref>` one can substitute the version given in conf.py into <ref>.
Usage
In your conf.py file:
release = '1.4.1a5'
version = '.'.join(release.split('.')[:2])
extensions = ['sphinx_version_ref']
Where version can of course be any string. The following uses of <ref> then will be parsed as:
Entered as <ref> |
Parsed as |
|---|---|
https://docs.com/{version}/index.html |
`https://docs.com/1.4/index.html`_ |
{version} <http://github.com/user/project/tree/{version}> |
`1.4 <http://github.com/user/project/tree/1.4>`_ |
See version {version} <http://github.com/user/project/tree/{release}> |
`See version 1.4 <http://github.com/user/project/tree/1.4.1a5>`_ |
See the docs for more information.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx-version-ref-0.1.0.tar.gz.
File metadata
- Download URL: sphinx-version-ref-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/2.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c72d70a7c501e41859a8f9c35559821022f3bc0b1be2dcd06ada8013cbe2cdd2
|
|
| MD5 |
6bb8cc4d46c10e82ee93a06920159b1d
|
|
| BLAKE2b-256 |
a19e587fd650393c88bd075f30442c089d311ed621c5980bf418f4acb5f334ab
|
File details
Details for the file sphinx_version_ref-0.1.0-py2-none-any.whl.
File metadata
- Download URL: sphinx_version_ref-0.1.0-py2-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/2.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5748efe10b4b4dce2279341ec2f5b06d9c3119e08d3b13635252b1ba81d0c39b
|
|
| MD5 |
633b03e7b82d7b5215fb7127e2fd4ee9
|
|
| BLAKE2b-256 |
9df86b0ec805e2930339d82cf6c1ff91134c035ec5c265077b48f513db03480a
|