Skip to content
Open
Changes from all 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
14 changes: 10 additions & 4 deletions doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ def _sphinx_build(self, kind: str):

Parameters
----------
kind : {'html', 'latex'}
kind : {'html', 'latex', 'linkcheck'}

Examples
--------
>>> DocBuilder(num_jobs=4)._sphinx_build('html')
"""
if kind not in ("html", "latex"):
raise ValueError(f"kind must be html or latex, not {kind}")
if kind not in ("html", "latex", "linkcheck"):
raise ValueError(f"kind must be html, latex or linkcheck, not {kind}")

cmd = ["sphinx-build", "-b", kind]
if self.num_jobs:
Expand Down Expand Up @@ -268,6 +268,12 @@ def latex_forced(self):
"""
return self.latex(force=True)

def linkcheck(self):
"""
Check the links in the documentation for validity.
"""
return self._sphinx_build("linkcheck")

@staticmethod
def clean():
"""
Expand Down Expand Up @@ -373,4 +379,4 @@ def main():


if __name__ == "__main__":
sys.exit(main())
sys.exit(main())