From 7bdd8652b14bc6ace72587474abe779ebb663524 Mon Sep 17 00:00:00 2001 From: Brylie Christopher Oxley Date: Mon, 6 Nov 2023 18:25:12 +0200 Subject: [PATCH 1/2] Allow users to use dark mode It is nice to allow users to choose light or dark mode based on their own needs, such as sensitivity to bright light. --- docs/docusaurus.config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 617aec3d0..371258a53 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -112,8 +112,10 @@ module.exports = { }, colorMode: { defaultMode: "light", - disableSwitch: true, - respectPrefersColorScheme: false, + /* Allow users to chose light or dark mode. */ + disableSwitch: false, + /* Respect user preferences, such as low light mode in the evening */ + respectPrefersColorScheme: true, }, announcementBar: { content: From b9510bebf69cea690a5d58695ed18ff2b5c99bc8 Mon Sep 17 00:00:00 2001 From: Brylie Christopher Oxley Date: Mon, 6 Nov 2023 18:53:30 +0200 Subject: [PATCH 2/2] Use github-dark theme for code examples --- docs/docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 371258a53..538180ccd 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -31,7 +31,7 @@ module.exports = { [ remarkCodeHike, { - theme: "github-light", + theme: "github-dark", showCopyButton: true, lineNumbers: true, },