Sphinx Skeleton
1

Table of Contents

  • 1. Sphinx
  • 2. sphinx/themes
  • 3. sphinx.ext
    • 3.1. sphinx.ext
    • 3.2. sphinx.ext.autodoc
    • 3.3. sphinx.ext.coverage
    • 3.4. sphinx.ext.doctest
    • 3.5. sphinx.ext.extlinks
      • 3.5.1. Functions
        • 3.5.1.1. sphinx.ext.extlinks.iteritems
        • 3.5.1.2. sphinx.ext.extlinks.make_link_role
        • 3.5.1.3. sphinx.ext.extlinks.setup
        • 3.5.1.4. sphinx.ext.extlinks.setup_link_roles
        • 3.5.1.5. sphinx.ext.extlinks.split_explicit_title
    • 3.6. sphinx.ext.graphviz
    • 3.7. sphinx.ext.ifconfig
    • 3.8. sphinx.ext.inheritance_diagram
    • 3.9. sphinx.ext.intersphinx
    • 3.10. sphinx.ext.jsmath
    • 3.11. sphinx.ext.linkcode
    • 3.12. sphinx.ext.mathbase
    • 3.13. sphinx.ext.mathjax
    • 3.14. sphinx.ext.pngmath
    • 3.15. sphinx.ext.todo
    • 3.16. sphinx.ext.viewcode
  • 4. sphinx.builders
  • 5. sphinx.domains
  • 6. sphinx.util
  • 7. sphinx.websupport
  • 8. misc modules
Sphinx Skeleton
  • Docs »
  • 3. sphinx.ext »
  • 3.5. sphinx.ext.extlinks
  • View page source

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.
Next Previous

© Copyright 2016.

Built with Sphinx using a theme provided by Read the Docs.