Skip to content

Commit c257742

Browse files
committed
🧪 Define linkcheck_anchors_ignore @ Sphinx
1 parent 16e322d commit c257742

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@
132132
r'^https://matrix\.to/#', # these render fully on front-end from anchors
133133
r'^https://stackoverflow\.com/', # these generate HTTP 403 Forbidden
134134
]
135+
linkcheck_anchors_ignore = [
136+
r'^!', # default
137+
# ignore anchors that start with a '/', e.g. Wikipedia media files:
138+
# https://en.wikipedia.org/wiki/Walrus#/media/File:Pacific_Walrus_-_Bull_(8247646168).jpg
139+
r'\/.*',
140+
r'issuecomment-\d+', # GitHub comments
141+
]
135142
linkcheck_workers = 25
136143

137144
# -- Options for sphinx.ext.autosectionlabel extension -----------------------

0 commit comments

Comments
 (0)