rust-lang / rust-lang/rust

Rustdoc should support multiple logo images

Open
#160,316 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-rustdoc-ui C-feature-request T-rustdoc T-rustdoc-frontend
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:

Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.