docs: allow for toggling light/dark mode (#2869)

This commit is contained in:
Geoff Bourne 2024-06-02 16:40:10 -05:00 committed by GitHub
parent 820d401911
commit b3e0ea14bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,6 +15,27 @@ theme:
- navigation.top
- navigation.indexes
locale: en
palette:
# 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
highlightjs: true
hljs_languages: