From f22faa7e06dd46483862d1c2cb2895ca519fe6a6 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Fri, 16 Jul 2021 14:34:35 +0200 Subject: Add intersphinx_disabled_domains Fixes sphinx-doc/sphinx#2068 Replaces sphinx-doc/sphinx#8981 --- doc/usage/extensions/intersphinx.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'doc/usage') diff --git a/doc/usage/extensions/intersphinx.rst b/doc/usage/extensions/intersphinx.rst index 478ddb7ae..5f4d1e7c9 100644 --- a/doc/usage/extensions/intersphinx.rst +++ b/doc/usage/extensions/intersphinx.rst @@ -148,6 +148,25 @@ linking: exception is raised if the server has not issued a response for timeout seconds. +.. confval:: intersphinx_disabled_domains + + .. versionadded:: 4.2 + + A list of strings being the name of a domain, or the special name ``all``. + When a cross-reference without an explicit inventory specification is being + resolve by intersphinx, skip resolution if either the domain of the + cross-reference is in this list or the special name ``all`` is in the list. + + For example, with ``intersphinx_disabled_domains = ['std']`` a cross-reference + ``:doc:`installation``` will not be attempted to be resolved by intersphinx, but + ``:doc:`otherbook:installation``` will be attempted to be resolved in the + inventory named ``otherbook`` in :confval:`intersphinx_mapping`. + At the same time, all cross-references generated in, e.g., Python, declarations + will still be attempted to be resolved by intersphinx. + + If ``all`` is in the list of domains, then no references without an explicit + inventory will be resolved by intersphinx. + Showing all links of an Intersphinx mapping file ------------------------------------------------ -- cgit v1.2.1 From c88c71839762bb81ca7b6d4ec9d7cdf63abcf4c3 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Sat, 17 Jul 2021 17:38:43 +0200 Subject: Fix typo --- doc/usage/extensions/intersphinx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/usage') diff --git a/doc/usage/extensions/intersphinx.rst b/doc/usage/extensions/intersphinx.rst index 5f4d1e7c9..fb00dc667 100644 --- a/doc/usage/extensions/intersphinx.rst +++ b/doc/usage/extensions/intersphinx.rst @@ -154,7 +154,7 @@ linking: A list of strings being the name of a domain, or the special name ``all``. When a cross-reference without an explicit inventory specification is being - resolve by intersphinx, skip resolution if either the domain of the + resolved by intersphinx, skip resolution if either the domain of the cross-reference is in this list or the special name ``all`` is in the list. For example, with ``intersphinx_disabled_domains = ['std']`` a cross-reference -- cgit v1.2.1 From 0d9f4cd469b3664319bc2d5da74cfae4bc0da9ec Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Sat, 2 Oct 2021 11:12:49 +0200 Subject: Generalize to disable specific refs as well. --- doc/usage/extensions/intersphinx.rst | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'doc/usage') diff --git a/doc/usage/extensions/intersphinx.rst b/doc/usage/extensions/intersphinx.rst index fb00dc667..c9075a42d 100644 --- a/doc/usage/extensions/intersphinx.rst +++ b/doc/usage/extensions/intersphinx.rst @@ -148,21 +148,28 @@ linking: exception is raised if the server has not issued a response for timeout seconds. -.. confval:: intersphinx_disabled_domains +.. confval:: intersphinx_disabled_refs - .. versionadded:: 4.2 + .. versionadded:: 4.3 + + A list of strings being either: + + - the name of a specific reference type, + e.g., ``std:doc``, ``py:func``, or ``cpp:class``, + - the name of a whole domain, e.g., ``std``, ``py``, or ``cpp``, or + - the special name ``all``. - A list of strings being the name of a domain, or the special name ``all``. When a cross-reference without an explicit inventory specification is being - resolved by intersphinx, skip resolution if either the domain of the - cross-reference is in this list or the special name ``all`` is in the list. - - For example, with ``intersphinx_disabled_domains = ['std']`` a cross-reference - ``:doc:`installation``` will not be attempted to be resolved by intersphinx, but - ``:doc:`otherbook:installation``` will be attempted to be resolved in the - inventory named ``otherbook`` in :confval:`intersphinx_mapping`. - At the same time, all cross-references generated in, e.g., Python, declarations - will still be attempted to be resolved by intersphinx. + resolved by intersphinx, skip resolution it matches one of the + specifications in this list. + + For example, with ``intersphinx_disabled_refs = ['std:doc']`` + a cross-reference ``:doc:`installation``` will not be attempted to be + resolved by intersphinx, but ``:doc:`otherbook:installation``` will be + attempted to be resolved in the inventory named ``otherbook`` in + :confval:`intersphinx_mapping`. + At the same time, all cross-references generated in, e.g., Python, + declarations will still be attempted to be resolved by intersphinx. If ``all`` is in the list of domains, then no references without an explicit inventory will be resolved by intersphinx. -- cgit v1.2.1 From cfbac2ceaafc38954c633bd05a6297d8ce89e6e3 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Sun, 31 Oct 2021 13:23:23 +0100 Subject: intersphinx_disabled_refs, rename 'all' to '*' --- doc/usage/extensions/intersphinx.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/usage') diff --git a/doc/usage/extensions/intersphinx.rst b/doc/usage/extensions/intersphinx.rst index c9075a42d..9063d52ec 100644 --- a/doc/usage/extensions/intersphinx.rst +++ b/doc/usage/extensions/intersphinx.rst @@ -157,7 +157,7 @@ linking: - the name of a specific reference type, e.g., ``std:doc``, ``py:func``, or ``cpp:class``, - the name of a whole domain, e.g., ``std``, ``py``, or ``cpp``, or - - the special name ``all``. + - the special name ``*``. When a cross-reference without an explicit inventory specification is being resolved by intersphinx, skip resolution it matches one of the @@ -171,7 +171,7 @@ linking: At the same time, all cross-references generated in, e.g., Python, declarations will still be attempted to be resolved by intersphinx. - If ``all`` is in the list of domains, then no references without an explicit + If ``*`` is in the list of domains, then no references without an explicit inventory will be resolved by intersphinx. -- cgit v1.2.1 From 484d74ad9773ee61c438c8f176ca16785f3a0614 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Sun, 31 Oct 2021 13:42:26 +0100 Subject: intersphinx_disabled_refs, doc default value --- doc/usage/extensions/intersphinx.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/usage') diff --git a/doc/usage/extensions/intersphinx.rst b/doc/usage/extensions/intersphinx.rst index 9063d52ec..745127971 100644 --- a/doc/usage/extensions/intersphinx.rst +++ b/doc/usage/extensions/intersphinx.rst @@ -159,6 +159,8 @@ linking: - the name of a whole domain, e.g., ``std``, ``py``, or ``cpp``, or - the special name ``*``. + The default value is an empty list. + When a cross-reference without an explicit inventory specification is being resolved by intersphinx, skip resolution it matches one of the specifications in this list. -- cgit v1.2.1 From 56002be5e1e5ea712e4e34dc8f4a3b2f446a4be6 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Sun, 31 Oct 2021 13:56:26 +0100 Subject: rename intersphinx_disabled_{refs -> reftypes} And change format for domains to {name}:* --- doc/usage/extensions/intersphinx.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'doc/usage') diff --git a/doc/usage/extensions/intersphinx.rst b/doc/usage/extensions/intersphinx.rst index 745127971..a3e65bed6 100644 --- a/doc/usage/extensions/intersphinx.rst +++ b/doc/usage/extensions/intersphinx.rst @@ -148,24 +148,25 @@ linking: exception is raised if the server has not issued a response for timeout seconds. -.. confval:: intersphinx_disabled_refs +.. confval:: intersphinx_disabled_reftypes .. versionadded:: 4.3 A list of strings being either: - - the name of a specific reference type, + - the name of a specific reference type in a domain, e.g., ``std:doc``, ``py:func``, or ``cpp:class``, - - the name of a whole domain, e.g., ``std``, ``py``, or ``cpp``, or - - the special name ``*``. + - the name of a domain, and a wildcard, e.g., + ``std:*``, ``py:*``, or ``cpp:*``, or + - simply a wildcard ``*``. The default value is an empty list. When a cross-reference without an explicit inventory specification is being - resolved by intersphinx, skip resolution it matches one of the + resolved by intersphinx, skip resolution if it matches one of the specifications in this list. - For example, with ``intersphinx_disabled_refs = ['std:doc']`` + For example, with ``intersphinx_disabled_reftypes = ['std:doc']`` a cross-reference ``:doc:`installation``` will not be attempted to be resolved by intersphinx, but ``:doc:`otherbook:installation``` will be attempted to be resolved in the inventory named ``otherbook`` in -- cgit v1.2.1