Rustdoc should support multiple logo images
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Rustdoc currently supports controlling the logo in the upper left hand side of the docs via the html_logo_url attribute. However most logos only look good in light mode, or in dark mode, but not in both. Here is a real world example:
It would be nice if rustdoc allowed for 2 distinct logo images to be specified via html_logo_url: one for light theme mode and one for dark theme/ayu mode. That way designers can tailor their logo's palette to complement the light or dark background.
A possible implementation could allow one or two url values for html_logo_url: if one is given it is used for the logo in all theme modes, but if two are given one is used in light mode and the other in dark/ayu mode. This design would be backward compatible with existing crates.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the rustdoc entry point and the html_logo_url attribute documentation, then trace how the logo URL is parsed and rendered for light, dark, and ayu themes. Done means supporting one URL for all themes or two URLs with distinct light and dark/ayu images while preserving existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100