3.5. sphinx.ext.extlinks¶
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': ('http://example.com/%s.html', prefix), ...}
Now you can use e.g. :exmpl:`foo` in your documents. This will create a
link to http://example.com/foo.html. The link caption depends on the
prefix value given:
- If it is
None, the caption will be the full URL. - If it is a string (empty or not), the caption will be the prefix prepended to the role content.
You can also give an explicit caption, e.g. :exmpl:`Foo <foo>`.
| copyright: | Copyright 2007-2016 by the Sphinx team, see AUTHORS. |
|---|---|
| license: | BSD, see LICENSE for details. |
3.5.1. Functions¶
iteritems(d, **kw) |
Return an iterator over the (key, value) pairs of a dictionary. |
make_link_role(base_url, prefix) |
|
setup(app) |
|
setup_link_roles(app) |
|
split_explicit_title(text) |
Split role content into title and target, if given. |