Reputation: 331
Say I have two links in a file.rst
:
.. _link1: https://link1.com
.. _link2: https://link1.com/val
Is there a way to use link1
in link2
like what I have below with custom display text for the user:
.. _link1: https://link1.com
.. _link2: link1/val
This is how I intend to use it:
See link `here <link1_>`_ for more details check `this <link2_>`_ out.
Upvotes: 0
Views: 132
Reputation: 15045
You could use the Sphinx extension extlinks
.
This extension is meant to help with the common pattern of having many external links that point to URLs on one and the same site, e.g. links to bug trackers, version control web interfaces, or simply subpages in other websites. It does so by providing aliases to base URLs, so that you only need to give the subpage name when creating a link.
Upvotes: 2