Browse Source

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.
xmkb
Piotr Gnus 3 years ago committed by GitHub
parent
commit
96bd927be2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      docs/docusaurus.config.js

3
docs/docusaurus.config.js

@ -10,6 +10,9 @@ module.exports = { @@ -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,

Loading…
Cancel
Save