Skip to content

docs(readme): use absolute URLs for logo images#21

Merged
nh13 merged 2 commits into
mainfrom
fix-crates-io-readme-logos
Apr 30, 2026
Merged

docs(readme): use absolute URLs for logo images#21
nh13 merged 2 commits into
mainfrom
fix-crates-io-readme-logos

Conversation

@nh13

@nh13 nh13 commented Apr 30, 2026

Copy link
Copy Markdown
Member

Why

crates.io strips relative image paths from rendered READMEs, so the logo at the top of this crate's page on crates.io is broken. Switching to absolute raw.githubusercontent.com URLs renders correctly on both GitHub and crates.io.

What changed

  • Replaced relative srcset/src paths with absolute raw URLs pinned to main.
  • GitHub continues to honor <picture> dark/light switching; crates.io ignores <source> and falls back to the <img> (light variant), which is the same behavior as before, just no longer broken.

Note

The crate page itself only updates on the next published version — this PR prevents future releases from being broken, but doesn't refresh the existing crate page.

(Replaces #20, which auto-closed when its base fix/clippy-1.95-warnings was deleted on merge of #19.)

nh13 added 2 commits April 30, 2026 13:08
Three new clippy errors started firing on `-D warnings` after the
rust-1.95 release:

- `clippy::manual_checked_ops` in src/catalog/builder.rs: rewrite
  the `pct` closure with `checked_div(total).unwrap_or(0)`, which
  is semantically identical to the existing `if total == 0 { 0 }
  else { (n * 100) / total }` form.
- `clippy::unnecessary_sort_by` in src/catalog/index.rs (x2):
  replace `sort_by(|a, b| b.1.cmp(&a.1))` with
  `sort_by_key(|b| std::cmp::Reverse(b.1))`. Both forms produce a
  stable sort by `.1` descending.

No behavioral change. Unblocks the pre-commit hook so README and
other commits can land again.
Use https://raw.githubusercontent.com/<org>/<repo>/main/... for logo
references so they render on crates.io. Relative paths render correctly
on GitHub but are dropped by the crates.io README sanitizer, leaving a
broken image at the top of every crate page.
@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@nh13 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 31 minutes and 1 second before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9c8372ce-b9e6-4d5b-8e8f-a5579006c7c8

📥 Commits

Reviewing files that changed from the base of the PR and between 80b4686 and 55b1c46.

📒 Files selected for processing (3)
  • README.md
  • src/catalog/builder.rs
  • src/catalog/index.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-crates-io-readme-logos

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 31 minutes and 1 second.

Comment @coderabbitai help to get the list of available commands and usage tips.

@nh13 nh13 merged commit b250663 into main Apr 30, 2026
4 checks passed
@nh13 nh13 deleted the fix-crates-io-readme-logos branch April 30, 2026 22:28
@nh13 nh13 mentioned this pull request Apr 30, 2026
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.

1 participant