mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
check_links - better handling of api tool links
This commit is contained in:
@@ -81,6 +81,9 @@ def checkLinks(offline=False):
|
||||
|
||||
|
||||
elif '#' in endpoint:
|
||||
if fname in config["ignore_anchors_in"]:
|
||||
print("Ignoring anchor %s in dynamic page %s"%(endpoint,fname))
|
||||
continue
|
||||
print("Testing local link %s from %s"%(endpoint, fullPath))
|
||||
num_links_checked += 1
|
||||
filename,anchor = endpoint.split("#",1)
|
||||
@@ -92,10 +95,10 @@ def checkLinks(offline=False):
|
||||
print("Broken local link in %s to %s"%(fullPath, endpoint))
|
||||
broken_links.append( (fullPath, endpoint) )
|
||||
|
||||
elif "-api-tool.html" in fullTargetPath:
|
||||
#These pages are populated dynamically, so BeatifulSoup wouldn't
|
||||
elif filename in config["ignore_anchors_in"]:
|
||||
#Some pages are populated dynamically, so BeatifulSoup wouldn't
|
||||
# be able to find anchors in them anyway
|
||||
print("Skipping anchor link in %s to API tool %s" %
|
||||
print("Skipping anchor link in %s to dynamic page %s" %
|
||||
(fullPath, endpoint))
|
||||
continue
|
||||
|
||||
|
||||
@@ -201,6 +201,11 @@ pages:
|
||||
|
||||
# Link Checker Config ------------------------------------------------------- #
|
||||
|
||||
ignore_anchors_in:
|
||||
- data-api-v2-tool.html
|
||||
- ripple-api-tool.html
|
||||
- tool-jsonrpc.html
|
||||
|
||||
#Sometimes, a link is not really problematic, but the link checker detects it
|
||||
# as such and the easiest solution is to ignore it.
|
||||
known_broken_links:
|
||||
|
||||
Reference in New Issue
Block a user