module documentation

Extension to save typing and prevent hard-coding of base URLs in the reST files.

This adds a new config value called extlinks that is created like this:

extlinks = {'exmpl': ('https://example.invalid/%s.html', caption), ...}

Now you can use e.g. :exmpl:`foo` in your documents. This will create a link to https://example.invalid/foo.html. The link caption depends on the caption value given:

  • If it is None, the caption will be the full URL.
  • If it is a string, it must contain %s exactly once. In this case the caption will be caption with the role content substituted for %s.

You can also give an explicit caption, e.g. :exmpl:`Foo <foo>`.

Both, the url string and the caption string must escape % as %%.

Unknown Field: copyright
Copyright 2007-2022 by the Sphinx team, see AUTHORS.
Unknown Field: license
BSD, see LICENSE for details.
Variable logger Undocumented
Class ​External​Links​Checker For each external link, check if it can be replaced by an extlink.
Function make​_link​_role Undocumented
Function setup Undocumented
Function setup​_link​_roles Undocumented
logger =

Undocumented

def make_link_role(name, base_url, caption):

Undocumented

Parameters
name:strUndocumented
base​_url:strUndocumented
caption:strUndocumented
Returns
RoleFunctionUndocumented
def setup(app):

Undocumented

Parameters
app:SphinxUndocumented
Returns
Dict[str, Any]Undocumented
def setup_link_roles(app):

Undocumented

Parameters
app:SphinxUndocumented