hugo-next / hugo-theme-next

Easily & powerful theme for Hugo engine.
https://hugo-next.eu.org
MIT License
208 stars 38 forks source link

giscus 在深色模式配置下没有默认为深色模式 #119

Open myeeye opened 9 months ago

myeeye commented 9 months ago

请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。 (Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.)

问题自检列表 (Issue Checklist)

请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)


预期行为 (Expected behavior)

请描述你想实现的预期效果 (Please describe the expected behavior what you want)

giscus 在全局默认为深色模式的情况下默认以深色模式出现。

实际行为 (Actual behavior)

请同时提供网站链接、屏幕截图和源码地址 (Please provide your site links, screenshots and code repository)

无论初始 darkmode 设置为何者,giscus 评论均默认以浅色模式出现;仅当手动点击“深浅模式切换”的按钮后 giscus 才会切换浅色 / 深色模式。

问题重现步骤 (Steps to reproduce the behavior)

打开 https://hugo-next.github.io/hugo-next-v4-introduced.html 页面,进入评论区,切换为 giscus,可以观察到 giscus 以浅色模式呈现。

image

连续点击两次“深浅模式切换”的按钮后,giscus 以深色模式呈现。

image

环境信息 (Environment Information)

主题配置(Configuration)

提供主题 config.yaml 中修改过的部分内容 (Paste ONLY CHANGED CONFIGURATION from config.yaml)

darkmode: true

其他有用信息 (Other Information)

例如:操作系统、浏览器等 (e.g. Browser, System)

Edge浏览器,Windows11。

elkan1788 commented 8 months ago

有点奇怪,在我的电脑上没有复现出这个问题,不知是否和网络环境有关系,待跟进看看。

xgnw commented 8 months ago

Edge浏览器,Windows10 也出现这种问题

elkan1788 commented 8 months ago

@myeeye @xgnw 建议还是检查一下你们的网络情况,示例站点是用vercel部署,估计国外服务器响应慢的原因,我用VPN连接过去访问(Windows10 Edge)是正常的,可以看下的gif录屏动画。 giscus深色显示