-
Notifications
You must be signed in to change notification settings - Fork 208
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
Setting ayu theme on new docs falls back to light theme on old docs #919
Comments
This seems like a duplicate of #464? Why should ayu be singled out specifically? |
I'm going to pull a quote from internals that hopefully provides good context:
Since we do have a fallback option in this case in that the majority of old documentation (and "old" in this case is only a few weeks) has the |
Hmm ... unlike most of the other CSS this is actually feasible because it's an entirely new file instead of a slightly modified one. Maybe we could notice the 404 looks like |
Regardless of what we do in docs.rs, it probably makes sense to have an upstream rustdoc fix that classifies themes as light/dark and falls back appropriately when switching. |
That won't help with this problem, which is about documentation generated before rustdoc got an Ayu theme. Any fix we upstream won't be applied to the existing docs. |
Yes, but in the future (if we choose to add more themes) I'd prefer to avoid piling on more "if somenewtheme-*.css, light" in docs.rs. |
Opened rust-lang/rust#74937 as an upstream issue to handle this automatically in the future. We probably don't want to do anything till that is done, then maybe we can have a smidgen of JS that backports that change into old docs (or decide that it's not worth supporting and wait for old docs to age out). |
The upstream issue was closed, tho I'm not sure in a way that helps here. |
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 thelight
theme sinceayu
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 thedark
theme instead.The text was updated successfully, but these errors were encountered: