Sphinx 使用手册
latest
  • 译者前言
  • 欢迎
  • 引言
  • Sphinx初尝
  • 调用 sphinx-build
  • 调用 sphinx-apidoc
  • reStructuredText 简介
  • Sphinx标记的组成
  • Sphinx Domains
  • Available builders
  • The build configuration file
  • Internationalization
  • HTML theming support
  • Templating
  • Sphinx Extensions
    • Tutorial: Writing a simple extension
    • Extension API
    • Writing new builders
    • Builtin Sphinx extensions
      • sphinx.ext.autodoc – Include documentation from docstrings
      • sphinx.ext.autosummary – Generate autodoc summaries
      • sphinx.ext.doctest – Test snippets in the documentation
      • sphinx.ext.intersphinx – Link to other projects’ documentation
      • Math support in Sphinx
      • sphinx.ext.graphviz – Add Graphviz graphs
      • sphinx.ext.inheritance_diagram – Include inheritance diagrams
      • sphinx.ext.refcounting – Keep track of reference counting behavior
      • sphinx.ext.ifconfig – Include content based on configuration
      • sphinx.ext.coverage – Collect doc coverage stats
      • sphinx.ext.todo – Support for todo items
      • sphinx.ext.extlinks – Markup to shorten external links
      • sphinx.ext.viewcode – Add links to highlighted source code
      • sphinx.ext.oldcmarkup – Compatibility extension for old C markup
    • Third-party extensions
  • Sphinx Web Support
  • Sphinx FAQ
  • Glossary
Sphinx 使用手册
  • Docs »
  • Sphinx Extensions »
  • sphinx.ext.extlinks – Markup to shorten external links
  • Edit on GitHub

sphinx.ext.extlinks – Markup to shorten external links

New in version 1.0.

This extension is meant to help with the common pattern of having many external links that point to URLs on one and the same site, e.g. links to bug trackers, version control web interfaces, or simply subpages in other websites. It does so by providing aliases to base URLs, so that you only need to give the subpage name when creating a link.

Let’s assume that you want to include many links to issues at the Sphinx tracker, at http://bitbucket.org/birkenfeld/sphinx/issue/num. Typing this URL again and again is tedious, so you can use extlinks to avoid repeating yourself.

The extension adds one new config value:

Note

Since links are generated from the role in the reading stage, they appear as ordinary links to e.g. the linkcheck builder.

Next Previous

© Copyright 2016,GPL. Add PDF and Simple Chinese support by supergis.. Revision ea8387fa.

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