diff options
author | Brigitta Sipocz <bsipocz@gmail.com> | 2014-08-21 12:47:32 +0100 |
---|---|---|
committer | Brigitta Sipocz <bsipocz@gmail.com> | 2014-08-21 12:47:32 +0100 |
commit | efbc771ff1544efd425d65919957bcbcf6155741 (patch) | |
tree | 41c131d796c7d72b2b13b2c77a052a995ad85dc6 | |
parent | e4225f843df3d072a79792edfa24763fde696102 (diff) | |
download | sphinx-efbc771ff1544efd425d65919957bcbcf6155741.tar.gz |
Addressing comment and adding docs
-rw-r--r-- | doc/ext/intersphinx.rst | 12 | ||||
-rw-r--r-- | sphinx/ext/intersphinx.py | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/doc/ext/intersphinx.rst b/doc/ext/intersphinx.rst index b3972b43..1cf4735e 100644 --- a/doc/ext/intersphinx.rst +++ b/doc/ext/intersphinx.rst @@ -102,6 +102,18 @@ linking: ``http://docs.python.org/3.2``. It is up to you to update the inventory file as new objects are added to the Python documentation. + .. versionadded:: 1.3 + + Alternative files can be specified for each inventory. One can give a + tuple for the second inventory tuple item as shown in the following + example. This will read the inventory iterating through the (second) + tuple items until the first successful fetch. The primary use case for + this to specify mirror sites for server downtime of the primary + inventory:: + + intersphinx_mapping = {'python': ('http://docs.python.org/3.2', + (None, 'python-inv.txt')} + .. confval:: intersphinx_cache_limit The maximum number of days to cache remote inventories. The default is diff --git a/sphinx/ext/intersphinx.py b/sphinx/ext/intersphinx.py index fa844353..320a9eb4 100644 --- a/sphinx/ext/intersphinx.py +++ b/sphinx/ext/intersphinx.py @@ -196,6 +196,7 @@ def load_mappings(app): if invdata: cache[uri] = (name, now, invdata) update = True + break if update: env.intersphinx_inventory = {} |