rust-lang / rust-lang/docs.rs

Setting ayu theme on new docs falls back to light theme on old docs

Open
#919 8 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-frontend E-easy
Dominant language
Rust
Stars
1.2k
Forks
232
Avg merge
11h 35m
Merged PRs (30d)
60

Description

If you go to newly generated docs like https://docs.rs/tokio/0.2.22/tokio/ and set your theme to ayu, then navigate to old docs like https://docs.rs/tokio/0.2.21/tokio/ it will fallback to the light theme since ayu doesn't exist and blind the user.

It might be possible to inject a little docs.rs specific JS to cause ayu to fallback to the dark theme instead.

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the theme transition using the linked Tokio 0.2.22 and 0.2.21 documentation pages, then locate the theme-selection code or docs.rs-specific JavaScript used by generated docs. Compare behavior when ayu is unavailable; done means the old page no longer falls back to light and instead uses the intended dark fallback.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, rust
Domain
documentation, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.