From 61e49018acc7b15e73388d6db0859e88581936e1 Mon Sep 17 00:00:00 2001 From: m12watanabe1a <40206149+m12watanabe1a@users.noreply.github.com> Date: Tue, 28 May 2024 23:37:59 +0900 Subject: [PATCH 1/2] Ignore anchor and local link --- conf.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf.py b/conf.py index dac7566340a..4e06d5641ad 100644 --- a/conf.py +++ b/conf.py @@ -176,6 +176,12 @@ sitemap_url_scheme = '{version}/{link}' +# -- Options for linkcheck ------------------------------------------------ +linkcheck_ignore = [ + r"^(?!http(|s):\/\/).*", # For ignore local link +] +linkcheck_anchors = False + class RedirectFrom(Directive): has_content = True From f4447db65b8ade07b7fda7c9966a72376e1a4c0b Mon Sep 17 00:00:00 2001 From: m12watanabe1a <40206149+m12watanabe1a@users.noreply.github.com> Date: Sun, 2 Jun 2024 15:42:54 +0900 Subject: [PATCH 2/2] Fix anchor ignore url --- conf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/conf.py b/conf.py index 4e06d5641ad..a2e1513b49a 100644 --- a/conf.py +++ b/conf.py @@ -178,9 +178,12 @@ # -- Options for linkcheck ------------------------------------------------ linkcheck_ignore = [ - r"^(?!http(|s):\/\/).*", # For ignore local link + r"^(?!http(|s)://).*", # For ignore local link +] +linkcheck_anchors_ignore_for_url = [ + r'https://github\.com/.*', + r'https://index\.ros\.org/.*' ] -linkcheck_anchors = False class RedirectFrom(Directive):