🐛 Fixed toggle theme color will refresh page.

This commit is contained in:
凡梦星尘
2022-10-23 16:05:23 +08:00
parent 1ae0ca2488
commit 913ae1821a
7 changed files with 77 additions and 91 deletions

View File

@@ -122,4 +122,10 @@
{{ end }}
{{ end }}
{{ $theme := "light" }}
{{ if .Site.Params.darkmode }}
{{ $theme = "dark" }}
{{ end }}
{{ $globalVars.Set "theme" $theme }}
{{ return $globalVars.Values }}