Skip to main content

Sphinx extension to substitute version in references.

Project description

PyPi version PyPi downloads per month Documentation Status

This extension adds a single role to Sphinx. With :version-ref:`<ref>` one can substitute the version given in into <ref>.


In your 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{version}/index.html


{version} <{version}>

`1.4 <>`_

See version {version} <{release}>

`See version 1.4 <>`_

See the docs for more information.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-version-ref-0.1.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

sphinx_version_ref-0.1.0-py2-none-any.whl (3.6 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page