docs: respect system color scheme preference in Docusaurus (#16748)

Configure Docusaurus to automatically detect and respect the user's
system/browser color scheme preference (prefers-color-scheme).

This improves UX by matching the documentation theme to the user's
OS-level dark/light mode setting, while still allowing manual override
via the theme switcher.

Changes:
- Add colorMode configuration to docusaurus.config.js
- Enable respectPrefersColorScheme option
This commit is contained in:
Cesar Garcia 2025-11-18 00:46:56 -03:00 committed by GitHub
parent e156c66575
commit 5ae99e2761
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -231,6 +231,11 @@ const config = {
],
copyright: `Copyright © ${new Date().getFullYear()} liteLLM`,
},
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,