diff options
Diffstat (limited to 'Dark-Mode.md')
-rw-r--r-- | Dark-Mode.md | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Dark-Mode.md b/Dark-Mode.md index da1fe35..0a86221 100644 --- a/Dark-Mode.md +++ b/Dark-Mode.md @@ -8,16 +8,9 @@ Then you will not see it. ## Automatically enable Dark Mode -Open `/static/js/journey.js`, and you will find this snippet. -(Currently at Line 78) +Add `enableAutoDarkMode=true` to the section of `[param]` in your `config.toml`. -```javascript - if (night==""){ - if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { - //this.toggleDarkMode(); - } -``` +(Thanks for the advice of james-cccc. [Issue #40](https://github.com/AmazingRise/hugo-theme-diary/issues/40)) -And remove `//` from `this.toggleDarkMode();`, then your site will enter dark mode automatically, following browser's preference. Feel free to raise an issue if you have some questions. :)
\ No newline at end of file |