Skip to content
Merged
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,19 @@ def zip_html(self):
os.chdir(dirname)
self._run_os("zip", zip_fname, "-r", "-q", *fnames)

def linkcheck(self):
"""
Check for broken links in the documentation.
"""
cmd = ["sphinx-build", "-b", "linkcheck"]
cmd += [
"-d",
os.path.join(BUILD_PATH, "doctrees"),
SOURCE_PATH,
os.path.join(BUILD_PATH, "linkcheck"),
]
subprocess.call(cmd)


def main():
cmds = [method for method in dir(DocBuilder) if not method.startswith("_")]
Expand Down Expand Up @@ -369,7 +382,11 @@ def main():
args.verbosity,
args.warnings_are_errors,
)
return getattr(builder, args.command)()

if args.command == "linkcheck":
builder.linkcheck() # Call the linkcheck method
else:
return getattr(builder, args.command)()


if __name__ == "__main__":
Expand Down