Can we use two different images for light and dark theme in sidebar? #1768
|
There is dark and light theme switcher available for docsify. Is there a way to use 2 images for sidebar one light theme and other for dark theme? |
Answered by
sy-records
Mar 9, 2022
Replies: 2 comments 8 replies
8 replies
Answer selected by
sy-records
|
Just in case someone finds this (already answered) thread again, if you use window.$docsify = {
darklightTheme: {
dark: {
docsify_logo_url: "url(/_media/logo_dark.svg)"
},
light: {
docsify_logo_url: "url(/_media/logo.svg)"
},
},
};<style>
.cover-main img {
content: var(--docsify_logo_url);
}
</style>Notably you don't need to use media selectors ( |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Sidebar images? Are you referring to the logo?
Dark mode will show a pink logo.
Add it to index.html:
docsify-darklight-theme
If you are using
docsify-darklight-theme, it needs…