redirect from docs.rs/crate-name to crate details if doc build failed #325
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #232
This PR adds a check to see whether the version being loaded by the crate-docs redirect has docs available. If the
rustdoc_status
indicates that there are no docs available (whether because the crate is a binary, or the last attempted build failed), then instead of redirecting to the docs page (and immediately hitting an empty 404 page), it redirects to the crate-info page instead.Currently this doesn't help the question "what is the last version where the docs actually worked" (#226), but this should be a decent quality-of-life improvement nonetheless.