Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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 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

Download files

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

Files for sphinx-version-ref, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size sphinx_version_ref-0.1.0-py2-none-any.whl (3.6 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size sphinx-version-ref-0.1.0.tar.gz (5.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page