Skip to content

How to set a dark theme for the whole website? #220

Answered by vincerubinetti
sterding asked this question in Q&A
Discussion options

You must be logged in to vote

As a temporary fix, in _scripts/dark-mode.js, change line 11 to:

  document.documentElement.dataset.dark = window.localStorage.getItem("dark-mode") ?? true;

I'll tweak this script in an upcoming update (#209) to allow setting a default more easily/cleanly, so look out for this change in the near future.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@sterding
Comment options

@vincerubinetti
Comment options

@sterding
Comment options

Answer selected by vincerubinetti
Comment options

You must be logged in to vote
1 reply
@vincerubinetti
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants