dillonzq / LoveIt

❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://hugoloveit.com
MIT License
3.42k stars 1.08k forks source link

[BUG] hugo giscus 评论区无法自动切换夜间模式 #870

Open hzp2333 opened 8 months ago

hzp2333 commented 8 months ago

Describe the bug 描述你遇到的错误

使用的giscus评论区,但是切换到夜间模式时,评论区没有自动切换。

Expected behavior 期待的行为

请问可能是哪个模块出问题呢?

Screenshots 屏幕截图

8e3ebce3d24162b97ea4d5e985da55b

Build Environment 构建环境

使用的多语言博客, config.toml设置如下,直接在结尾加上的这部分。

[params.page.comment]
      enable = true       
[params.page.comment.giscus]   
  enable = true   
  repo = "hzp2333/Giscus"   
  repoId = "###########"   
  category = "Announcements"   
  categoryId = "###########"   
  lang = ""   
  mapping = "pathname"   
  reactionsEnabled = "1"   
  emitMetadata = "0"   
  inputPosition = "bottom"   
  lazyLoading = false
  darkTheme = "dark"
  lightTheme = "light"

Preview Environment 预览环境

No response

Additional Information 补充信息

当我把config.toml更换为

 darkTheme = "dark"
  lightTheme = "dark"

时,博客无论白天还是夜间模式,评论区都是深色模式。 感觉是识别深色模型的部分出问题了? 网站:https://blog.huaxiangshan.com/ 感谢回复

danish-mehmood commented 4 months ago

@hzp2333 in https://giscus.app/ you would need to set the "preffered color scheme" in theme section dropdown