scanrefs: only scan docs, not JS files
This is a temporary hack until we find a sensible way to scan the proxmox-widget-toolkit JS files as well. Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
parent
924d6d4072
commit
d8916a326c
|
@ -73,7 +73,9 @@ class ReflabelMapper(Builder):
|
||||||
'link': '/docs/index.html',
|
'link': '/docs/index.html',
|
||||||
'title': 'Proxmox Backup Server Documentation Index',
|
'title': 'Proxmox Backup Server Documentation Index',
|
||||||
}
|
}
|
||||||
self.env.used_anchors = scan_extjs_files()
|
# Disabled until we find a sensible way to scan proxmox-widget-toolkit
|
||||||
|
# as well
|
||||||
|
#self.env.used_anchors = scan_extjs_files()
|
||||||
|
|
||||||
if not os.path.isdir(self.outdir):
|
if not os.path.isdir(self.outdir):
|
||||||
os.mkdir(self.outdir)
|
os.mkdir(self.outdir)
|
||||||
|
@ -115,15 +117,18 @@ class ReflabelMapper(Builder):
|
||||||
def validate_anchors(self):
|
def validate_anchors(self):
|
||||||
#pprint(self.env.online_help)
|
#pprint(self.env.online_help)
|
||||||
to_remove = []
|
to_remove = []
|
||||||
for anchor in self.env.used_anchors:
|
|
||||||
if anchor not in self.env.online_help:
|
# Disabled until we find a sensible way to scan proxmox-widget-toolkit
|
||||||
logger.info("[-] anchor {} is missing from onlinehelp!".format(anchor))
|
# as well
|
||||||
for anchor in self.env.online_help:
|
#for anchor in self.env.used_anchors:
|
||||||
if anchor not in self.env.used_anchors and anchor != 'pbs_documentation_index':
|
# if anchor not in self.env.online_help:
|
||||||
logger.info("[*] anchor {} not used! deleting...".format(anchor))
|
# logger.info("[-] anchor {} is missing from onlinehelp!".format(anchor))
|
||||||
to_remove.append(anchor)
|
#for anchor in self.env.online_help:
|
||||||
for anchor in to_remove:
|
# if anchor not in self.env.used_anchors and anchor != 'pbs_documentation_index':
|
||||||
self.env.online_help.pop(anchor, None)
|
# logger.info("[*] anchor {} not used! deleting...".format(anchor))
|
||||||
|
# to_remove.append(anchor)
|
||||||
|
#for anchor in to_remove:
|
||||||
|
# self.env.online_help.pop(anchor, None)
|
||||||
return
|
return
|
||||||
|
|
||||||
def finish(self):
|
def finish(self):
|
||||||
|
|
Loading…
Reference in New Issue