How to make an internal hyper link in sphinx documentation

ajax-ie picture ajax-ie · Dec 8, 2010 · Viewed 13.8k times · Source

How to make an internal hyper link in sphinx documentation? I am using:

:role:`target`  

But it is not working.

Answer

pyfunc picture pyfunc · Dec 8, 2010

Cross-referencing is done using a ref

:ref:`label-name`

You can provide your labels using:

.. _label-name:

See: https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-ref

Roles are used to create custom interpreted text. See: http://docutils.sourceforge.net/docs/ref/rst/directives.html#role