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

Break out check_external_links into a command-line flag or subcommand #381

Open
Freaky opened this Issue Aug 25, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Freaky
Contributor

Freaky commented Aug 25, 2018

check_external_links is very expensive, and isn't even recommended to be left on even in the docs. I think it would be more practical as either a run-time argument to build, or ideally as its own subcommand.

It's also quite frustrating for it to just stop on the first error, necessitating running it repeatedly, particularly when using the command for the first time.

@Freaky

This comment has been minimized.

Show comment
Hide comment
@Freaky

Freaky Aug 25, 2018

Contributor

Also: Reason: Link https://crates.io/crates/rand is not valid: 404 Not Found

I think this was an Accept-Content thing.

Contributor

Freaky commented Aug 25, 2018

Also: Reason: Link https://crates.io/crates/rand is not valid: 404 Not Found

I think this was an Accept-Content thing.

@Keats

This comment has been minimized.

Show comment
Hide comment
@Keats

Keats Aug 25, 2018

Owner

For crates.io: I mentioned it on the post for 0.4 but it behaves badly and always return 404. I'm tempted to replace my crates.io use with https://crates.rs/

It's also quite frustrating for it to just stop on the first error, necessitating running it repeatedly, particularly when using the command for the first time.

I agree this should be improved, instead of stopping at one error it should check all links and report all the ones not working. The issue is that it is currently part of the rendering which stops when it sees an error.

I'm not sure about having a separate command for that but i like the flag idea

Owner

Keats commented Aug 25, 2018

For crates.io: I mentioned it on the post for 0.4 but it behaves badly and always return 404. I'm tempted to replace my crates.io use with https://crates.rs/

It's also quite frustrating for it to just stop on the first error, necessitating running it repeatedly, particularly when using the command for the first time.

I agree this should be improved, instead of stopping at one error it should check all links and report all the ones not working. The issue is that it is currently part of the rendering which stops when it sees an error.

I'm not sure about having a separate command for that but i like the flag idea

@Keats Keats added the enhancement label Aug 25, 2018

Freaky added a commit to Freaky/gutenberg that referenced this issue Aug 25, 2018

link_checker: Set Accept header
As mentioned in #381, crates.io 404's any request without an Accept:
text/html header.  It 200's any request with one, but at least
false-successes don't prevent checking any other links.

This also makes it easier to add a custom User-Agent if desired.

rustfmt and fix a clippy nit (unnecessary return) while I'm here.

Freaky added a commit to Freaky/gutenberg that referenced this issue Aug 25, 2018

link_checker: Set Accept header
As mentioned in #381, crates.io 404's any request without an Accept:
text/html header.  It 200's any request with one, but at least
false-successes don't prevent checking any other links.

This also makes it easier to add a custom User-Agent if desired.

rustfmt and fix a clippy nit (unnecessary return) while I'm here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment