Skip to content

max-sn/sphinx_version_ref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sphinx_version_ref

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages