Skip to content

Commit

Permalink
allow customising linkcheck_anchors_ignore_for_url
Browse files Browse the repository at this point in the history
Users might want to add more URLs for which the anchors are
ignored, so add a custom variable for this.
We should ignore GitHub globally, since those anchors are
handled in a way the linkchecker can't deal with, so this
will be an issue for all doc sets.

Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
  • Loading branch information
ru-fu committed Aug 31, 2023
1 parent 3ecea52 commit 4c08b15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
linkcheck_anchors_ignore_for_url = [
r'https://github\.com/.*'
]
linkcheck_anchors_ignore_for_url.extend(custom_linkcheck_anchors_ignore_for_url)

############################################################
### Styling
Expand Down
6 changes: 6 additions & 0 deletions custom_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
'http://127.0.0.1:8000'
]

# Pages on which to ignore anchors
# (This list will be appended to linkcheck_anchors_ignore_for_url)

custom_linkcheck_anchors_ignore_for_url = [
]

############################################################
### Additions to default configuration
############################################################
Expand Down

0 comments on commit 4c08b15

Please sign in to comment.