Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linkcheck to docs workflows #1853

Closed
matthewfeickert opened this issue Apr 27, 2022 · 1 comment · Fixed by #1855
Closed

Add linkcheck to docs workflows #1853

matthewfeickert opened this issue Apr 27, 2022 · 1 comment · Fixed by #1855
Assignees
Labels
CI CI systems, GitHub Actions docs Documentation related

Comments

@matthewfeickert
Copy link
Member

matthewfeickert commented Apr 27, 2022

With the addition of user-defined build jobs in ReadTheDocs I noticed that one of their examples was to perform a check for broken links with sphinx's linkcheck.

I'm working on adding this both to the ReadTheDocs config and to the docs GHA workflow, but at the moment

$ cd docs
$ make linkcheck

is giving a failure

(           babel: line    3) broken    cli.html#pyhf-xml2json -

on

Many of these solutions involve extracting out the ``HistFactory`` workspace and then running `pyhf xml2json <cli.html#pyhf-xml2json>`_ which provides a single JSON workspace that can be loaded directly into ``pyhf``.

I'm not quite sure why, as this is a valid link once the source is built, but I think it might be a form of sphinx-doc/sphinx#9383.

I have this and other fixes on a branch named docs/use-read-the-docs-pre-build-job.

@matthewfeickert
Copy link
Member Author

This can be solved as suggested in sphinx-doc/sphinx#7056 by simply adding the following to docs/conf.py:

linkcheck_ignore = ['cli.html#pyhf-xml2json']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI CI systems, GitHub Actions docs Documentation related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant