diff --git a/source/conf.py b/source/conf.py index f08f6e836..c73dabdf2 100644 --- a/source/conf.py +++ b/source/conf.py @@ -141,11 +141,13 @@ "https://anaconda.org", ] linkcheck_retries = 5 -# Ignore anchors for links to GitHub project pages -- GitHub adds anchors from -# README.md headings through JavaScript, so Sphinx's linkcheck can't find them -# in the HTML. +# Ignore anchors for common targets when we know they likely won't be found linkcheck_anchors_ignore_for_url = [ + # GitHub synthesises anchors in JavaScript, so Sphinx can't find them in the HTML r"https://github\.com/", + # While PyPI has its botscraping defenses active, Sphinx can't resolve the anchors + # https://github.com/pypa/packaging.python.org/issues/1744 + r"https://pypi\.org/", ] # -- Options for extlinks ----------------------------------------------------------