diff --git a/scripts/mkdocs_hooks.py b/scripts/mkdocs_hooks.py index cbd88b5c..376ef4fb 100644 --- a/scripts/mkdocs_hooks.py +++ b/scripts/mkdocs_hooks.py @@ -153,11 +153,9 @@ def path_to_url(self, url: str) -> str: assert target_uri is not None assert target_file is not None if target_file.inclusion.is_excluded(): - target = target_uri - link_error = LINKED_PAGE_EXCLUDED + self.add_broken_link(LINKED_PAGE_EXCLUDED, target_uri, None) path = utils.get_relative_url(target_file.url, self.file.url) - self.add_broken_link(link_error, target, None) return urlunsplit(('', '', path, query, fragment))