-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[docs] Default to following the system dark/light mode #7888
Conversation
That is a good idea, unfortunately it doesn't seem to work for me (firefox on ubuntu 22.04). Other tabs change theme, but the ruffs docs don't. I can see the "Linting the CPython codebase from scratch" figure switch themes though so i'm surprised the rest of the page doesn't. |
It says the change is only in tag insiders-4.18.0, and the little heart says “sponsors only”. I’m not sure how building ruff’s docs works. Does the presence of mkdocs.insiders.yml mean that the docs can be built with and without insiders “mode”? If that assumption is correct, my change should probably live in the mkdocs.insiders.yml instead. |
@konstin - Just confirming, are you building with insiders locally? |
Nope sorry i missed, i still have to check this with insiders (or someone else with access, i'm currently working on #7873 and would return to this PR later today) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the insiders version it works, thanks!
## Summary This fixes the theme toggle so it has the most useful setting on by default: following the system dark/light mode See https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#automatic-light-dark-mode ## Test Plan It follows the official docs exactly. If the docs get published for each PR branch, we can also check there if it works as intended. --------- Co-authored-by: konstin <konstin@mailbox.org>
Summary
This fixes the theme toggle so it has the most useful setting on by default: following the system dark/light mode
See https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#automatic-light-dark-mode
Test Plan
It follows the official docs exactly. If the docs get published for each PR branch, we can also check there if it works as intended.