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

Filter out package.documentation links to docs.rs itself #2184

Open
Nemo157 opened this issue Aug 6, 2023 · 1 comment
Open

Filter out package.documentation links to docs.rs itself #2184

Nemo157 opened this issue Aug 6, 2023 · 1 comment
Labels
A-frontend Area: Web frontend E-easy Effort: Should be easy to implement and would make a good first PR mentor This has instructions for getting started

Comments

@Nemo157
Copy link
Member

Nemo157 commented Aug 6, 2023

On e.g. https://docs.rs/crate/diesel/latest there's a "Documentation" link in the left-hand bar that just points to https://docs.rs/diesel. This is mainly shown for cases where a crate has external documentation, e.g. https://docs.rs/crate/diesel/0.13.0 which links to http://docs.diesel.rs/, so we should suppress showing it for cases that just link back to docs.rs.

@syphar syphar added mentor This has instructions for getting started E-easy Effort: Should be easy to implement and would make a good first PR A-frontend Area: Web frontend labels Feb 14, 2024
@syphar
Copy link
Member

syphar commented Feb 14, 2024

mentoring instructions:

  • when loading the crate details from the database (in CrateDetails::new in web::crate_details) we also load documentation_url
  • here we want to ignore the documentation URL when it starts with https://docs.rs, so CrateDetails.documentation_url is None in this case
  • add a test for this, just on CrateDetails is fine

the interfaces already show the link only when there is an URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Web frontend E-easy Effort: Should be easy to implement and would make a good first PR mentor This has instructions for getting started
Projects
None yet
Development

No branches or pull requests

2 participants