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

Implement local link checking as part of build #487

Merged
merged 7 commits into from Jun 23, 2020
Merged

Conversation

milibopp
Copy link
Contributor

@milibopp milibopp commented Jun 22, 2020

This was #483, addresses part of #481.

Now with preview ;)

This was a bit more involved than initially anticipated. I don't think it's feasible to test local files without a webserver, as the file path semantics are different. There were a bunch of false negatives, as linkchecker simply ignored paths like /nixpkgs as they are outside the domain – and they would not work, as they translate to file:///nixpkgs.

Starting a local webserver is a heavier approach, but solves the issue. Here I chose caddy instead of, say, python -m http.server, because it is quite a bit faster, yet still zero-configuration for this use case. (I also considered lighttpd and busybox httpd, both of which had unsuitable default configurations.)

The /pkgs/... routes from the nixpkgs manual are ignored, because I think this issue should likely be solved upstream. Even without checking the nixpkgs manual, this setup provides significant value to guard against dead link regressions.

An end-to-end link check against deployed https://nixos.org is out of scope for this PR.

@github-actions
Copy link
Contributor

@garbas garbas self-requested a review June 23, 2020 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants