Skip to content

Commit

Permalink
docs: Make the website's theme adjustable.
Browse files Browse the repository at this point in the history
The website will also adjust to the system default theme now. 
I mostly did this because I am a darkkmode user and we didn't provide it yet.
  • Loading branch information
PhilipMetzger committed Jan 6, 2024
1 parent 546fe73 commit 9dfcec9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@ theme:
language: 'en'
features:
# - navigation.top

# Respect the users default settings and add adjustable light/darkmode toggle.
# taken from https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#system-preference
palette:

# TODO: enable this after we upgrade mkdocs-material above "^9.5"
# Palette toggle for automatic mode
# - media: "(prefers-color-scheme)"
# toggle:
# icon: material/brightness-auto
# name: Switch to light mode
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to system preference

extra:
version:
provider: mike
Expand Down

0 comments on commit 9dfcec9

Please sign in to comment.