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:
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 | ExternalLinksChecker |
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 |
Undocumented
Parameters | |
name:str | Undocumented |
base_url:str | Undocumented |
caption:str | Undocumented |
Returns | |
RoleFunction | Undocumented |