Linking into other sites
This site declares one other site's inventory, Python's, in its
inventories (see examples/intersphinx/BUILD.bazel). A reference no
document here defines is then looked up in it — Sphinx's intersphinx, with
the objects.inv a pinned build input rather than something fetched while
building. Every link below leaves this site.
Ordinary roles fall back to the inventory
Nothing has to be spelled differently: a role first searches this site and then every declared inventory, in the order the site lists them.
Python objects:
dict,len,ValueError,dict.get,os.pathandobject.__dict__. The role's type still matters —ValueErrorfinds an exception, as it would locally.A C function:
PyObject_GetAttr.A glossary term: bytecode.
A command-line option:
-O.A label, which shows the title that site gives it: Whetting Your Appetite. An explicit title still wins: the chapter on functions.
Naming the inventory in the target
A name: prefix picks one inventory out, as in Sphinx — but only when the
target is not found as written, so a label that merely contains a colon still
works: Mapping Types — dict.
The :external: roles
:external: skips this site entirely, and :external+name: searches one
inventory alone. This site defines a label of its own named typesmapping,
just below; the two roles here reach it and Python's respectively:
A local label that shadows Python's — this site's label wins, as any local target does.
Mapping Types — dict — Python's, since this site is not searched.
The other roles take the prefix too: list,
open, iterable and
-X.
A local label that shadows Python's
This section exists so the two references above have something local to disagree about.
An inventory that was never declared
Naming an inventory the site does not declare is reported as
link.unknown-inventory — the target is not the problem, so it is not
reported as a broken link. It is suppressed here, since //examples:site is
built with strict_links = True:
ndarray names numpy, which this site never
declared.