Usage

  1. Install and enable this extension.

    conf.py
    1extensions = [
    2    "sphinxcontrib.external_links",
    3]
    
  2. (optional) Add your own mapping of external links using external_links and substitutions using external_links_substitutions.

    conf.py
    1external_links = {
    2    "Google": "https://google.com",  # matches ":link:`google`", ":link:`Google`", etc
    3}
    4external_links_substitutions = {
    5    "dict": ":class:`dict`"
    6}
    
  3. Use the :link: role in your documentation to use the external link.

    Provide a link to :link:`Google` to :link:`google.com <google>`.
    Describe something as a |dict|.
    

    Provide a link to Google to google.com. Describe something as a dict.