summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPiotr Gnus <gbdlin@users.noreply.github.com>2021-05-05 06:15:38 +0200
committerGitHub <noreply@github.com>2021-05-05 00:15:38 -0400
commit96bd927be2d160255b019e1a5bd2cbd2ec2cc8b7 (patch)
tree56c76f695250ff728ceb888491ec4dcd1cda6ab9 /docs
parentfadb50867147c935b912b2afbfebd9734ef00ccb (diff)
feat(docs): Added support for prefers-color-scheme in docs
Now, instead of always defaulting to light theme, documentation, docs will default to the color scheme based by the user preference (reported by web browser as a `prefers-color-scheme` media query). It is still possible for user to change the theme by using the switch next to the search box. His preference will be remembered.
Diffstat (limited to 'docs')
-rw-r--r--docs/docusaurus.config.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js
index ab7ec12..385e3f5 100644
--- a/docs/docusaurus.config.js
+++ b/docs/docusaurus.config.js
@@ -10,6 +10,9 @@ module.exports = {
projectName: "zmk", // Usually your repo name.
plugins: [path.resolve(__dirname, "src/docusaurus-tree-sitter-plugin")],
themeConfig: {
+ colorMode: {
+ respectPrefersColorScheme: true,
+ },
googleAnalytics: {
trackingID: "UA-145201102-2",
anonymizeIP: true,