|
44 | 44 | # Set to '' to prevent appending "documentation" to the site title
|
45 | 45 | html_title = ""
|
46 | 46 |
|
| 47 | +linkcheck_allowed_redirects = { |
| 48 | + # Edit page |
| 49 | + r"https://docs.google.com/document/d/.*/": r"https://docs.google.com/document/d/.*/edit", |
| 50 | + # Canonical |
| 51 | + r"https://docs.python.org/": r"https://docs.python.org/3/", |
| 52 | + # Translations with country codes |
| 53 | + r"https://docs.python.org/[a-z-]+/": r"https://docs.python.org/[a-z-]+/3/", |
| 54 | + # Personal /my/ links redirect to login page |
| 55 | + r"https://discuss.python.org/my/.*": r"https://discuss.python.org/login-preferences", |
| 56 | + # Login page |
| 57 | + r"https://github.com/python/core-workflow/issues/new.*": r"https://github.com/login.*", |
| 58 | + # Archive redirect |
| 59 | + r"https://github.com/python/cpython/archive/main.zip": r"https://codeload.github.com/python/cpython/zip/refs/heads/main", |
| 60 | + # Blob to tree |
| 61 | + r"https://github.com/python/cpython/blob/.*": r"https://github.com/python/cpython/tree/.*", |
| 62 | + # HackMD shortcuts |
| 63 | + r"https://hackmd.io/s/.*": r"https://hackmd.io/@.*", |
| 64 | + # Read the Docs |
| 65 | + r"https://virtualenv.pypa.io/": r"https://virtualenv.pypa.io/en/latest/", |
| 66 | + r"https://www.sphinx-doc.org/": r"https://www.sphinx-doc.org/en/master/", |
| 67 | + # Cookie consent |
| 68 | + r"https://www.youtube.com/playlist.*": r"https://consent.youtube.com/ml.*", |
| 69 | +} |
| 70 | + |
47 | 71 | # ignore linkcheck anchors for /#/$ANCHOR since it is used for
|
48 | 72 | # dynamic pages such as http://buildbot.python.org/all/#/console
|
49 | 73 | # http://www.sphinx-doc.org/en/stable/config.html?highlight=linkcheck#confval-linkcheck_anchors_ignore
|
50 | 74 | linkcheck_anchors_ignore = [
|
51 | 75 | # match any anchor that starts with a '/' since this is an invalid HTML anchor
|
52 | 76 | r'\/.*',
|
53 | 77 | ]
|
| 78 | + |
| 79 | +linkcheck_ignore = [ |
| 80 | + # The voters repo is private and appears as a 404 |
| 81 | + 'https://github.com/python/voters/', |
| 82 | + # The python-core team link is private, redirects to login |
| 83 | + 'https://github.com/orgs/python/teams/python-core', |
| 84 | + # The Discourse groups are private unless you are logged in |
| 85 | + 'https://discuss.python.org/groups/staff', |
| 86 | + 'https://discuss.python.org/groups/moderators', |
| 87 | + 'https://discuss.python.org/groups/admins', |
| 88 | + # The crawler gets "Anchor not found" for GitHub anchors |
| 89 | + r'https://github.com.+?#L\d+', |
| 90 | + r'https://github.com/cli/cli#installation', |
| 91 | + r'https://github.com/github/renaming#renaming-existing-branches', |
| 92 | + # Discord doesn't allow robot crawlers: "403 Client Error: Forbidden" |
| 93 | + r'https://support.discord.com/hc/en-us/articles/219070107-Server-Nicknames', |
| 94 | +] |
| 95 | + |
54 | 96 | rediraffe_redirects = {
|
55 | 97 | "clang.rst": "advanced-tools/clang.rst",
|
56 | 98 | "coverity.rst": "advanced-tools/coverity.rst",
|
|
90 | 132 | "triaging.rst": "triage/triaging.rst",
|
91 | 133 | }
|
92 | 134 |
|
93 |
| -linkcheck_ignore = [ |
94 |
| - # The voters repo is private and appears as a 404 |
95 |
| - 'https://github.com/python/voters/', |
96 |
| - # The python-core team link is private, redirects to login |
97 |
| - 'https://github.com/orgs/python/teams/python-core', |
98 |
| - # The Discourse groups are private unless you are logged in |
99 |
| - 'https://discuss.python.org/groups/staff', |
100 |
| - 'https://discuss.python.org/groups/moderators', |
101 |
| - 'https://discuss.python.org/groups/admins', |
102 |
| -] |
103 |
| - |
104 | 135 | intersphinx_mapping = {
|
105 | 136 | 'python': ('https://docs.python.org/3', None),
|
106 | 137 | }
|
|
0 commit comments