From 4c08b1599e1b9b392a02edd22cd3acf9ef7e0284 Mon Sep 17 00:00:00 2001 From: Ruth Fuchss Date: Thu, 31 Aug 2023 11:41:30 +0200 Subject: [PATCH] allow customising linkcheck_anchors_ignore_for_url 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 --- conf.py | 1 + custom_conf.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/conf.py b/conf.py index be11d82f..e429126e 100644 --- a/conf.py +++ b/conf.py @@ -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 diff --git a/custom_conf.py b/custom_conf.py index e8487a0b..8c8d7bc2 100644 --- a/custom_conf.py +++ b/custom_conf.py @@ -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 ############################################################