sphinx / doc / ext / extlinks.rst

:mod:`sphinx.ext.extlinks` -- Markup to shorten external links

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.

Let's assume that you want to include many links to issues at the Sphinx tracker, at :samp:`{num}`. Typing this URL again and again is tedious, so you can use :mod:`~sphinx.ext.extlinks` to avoid repeating yourself.

The extension adds one new config value:


Since links are generated from the role in the reading stage, they appear as ordinary links to e.g. the linkcheck builder.