lxndrblz / anatole

Anatole is a minimalistic two-column theme for Hugo.
https://themes.gohugo.io/themes/anatole/
MIT License
648 stars 355 forks source link

Giscus with old version of anatole #485

Closed ciro-mota closed 6 months ago

ciro-mota commented 6 months ago

I still use version 1.1.0 of anatole, I recently discovered giscus as an alternative to Disqus and chose to implement it on my blog. I took advantage of the codes from PR #448 and added the codes to my blog. giscus is working normally, but the dynamic theme as described in the PR is not working (is always dark).

How can I modify my version so that the dynamic theme works?

Thank you!

ciro-mota commented 6 months ago

I discovered the problem.

In the old code the theme switcher is called by the "theme-switch" class:

<a class="theme-switch" title="Modo Claro/Escuro" rel="nofollow">
  <i class="fas fa-adjust" aria-hidden="true"></i>
</a>

So it was only necessary to change the corresponding class in line 40 of the giscus code.