Skip to content

Commit 451f517

Browse files
committed
Add colorMode to respect user's light/dark theme preference
Introduced a colorMode section in the Docusaurus config to set the default mode to light, enable the color mode switch, and respect the user's preferred color scheme.
1 parent ecf73fc commit 451f517

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docusaurus.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,11 @@ const config = {
571571
textColor: '#FFFFFF',
572572
isCloseable: false,
573573
},
574+
colorMode: {
575+
defaultMode: 'light',
576+
disableSwitch: false,
577+
respectPrefersColorScheme: true,
578+
},
574579
zoom: {
575580
selector: '.markdown :not(em) > img',
576581
background: {

0 commit comments

Comments
 (0)