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

docs-ci: Check external links #29

Open
tsibley opened this issue Nov 9, 2022 · 2 comments
Open

docs-ci: Check external links #29

tsibley opened this issue Nov 9, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request priority: low To be resolved after high and moderate priority issues

Comments

@tsibley
Copy link
Member

tsibley commented Nov 9, 2022

Running Sphinx's linkcheck builder to systematically check our external links would be really helpful to catch broken links resulting from anything from typos when authoring to third-party site reorganizations.

It would have caught a bunch of external link errors in nextstrain/docs.nextstrain.org#139, for example. (Not calling out that PR specifically! This sort of error is very common and easy to make. But that PR made me wonder why we weren't already running linkcheck.)

A second job (for parallelism) or just a subsequent step in the current job should run something like:

SPHINXOPTS="-W --keep-going" make linkcheck

which will produce a bunch of messages to stdout/stderr output but also build/linkcheck/output.{txt,json}. Both of the latter files (and probably just the whole build/ dir!) should be uploaded as a workflow artifact. Examples of output from nextstrain/docs.nextstrain.org@6fcf76f.

Since linkcheck will exit with a non-zero status on errors, it'll fail the CI job. I believe this is what we want.

Some configuration for linkcheck is usually required to ignore links that are actually ok, and this would fall on each doc project to configure itself.

@tsibley tsibley added the enhancement New feature or request label Nov 9, 2022
@genehack
Copy link
Contributor

@tsibley is this still something that needs to be done?

@tsibley
Copy link
Member Author

tsibley commented May 14, 2024

I think it's (still) worth doing. Clearly not high priority, but fairly low effort to actually do.

@victorlin victorlin added the priority: low To be resolved after high and moderate priority issues label May 15, 2024
@genehack genehack self-assigned this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: low To be resolved after high and moderate priority issues
Projects
No open projects
Development

No branches or pull requests

3 participants