-
Notifications
You must be signed in to change notification settings - Fork 913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add giscus #484
base: master
Are you sure you want to change the base?
Add giscus #484
Conversation
README.md
Outdated
reactions-enabled: 0 # OPTIONAL: Disable reactions | ||
emit-metadata: 1 # OPTIONAL: Emit discussion metadata | ||
input-position: top # OPTIONAL: Place the comment box above the comments | ||
theme: # OPTIONAL: Take the `color_theme` by default, or set a custom one like github-dark-orange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, does it handle the theme color change dynamically as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, looks like it doesn't.
I believe it comprehends site.color_theme
in _config.yml as-is (auto
), and since it's not dark
, it falls back to the light
.
What I did in giscus.liquid
above is the same as how utterances.liquid
did here:
theme="{% if site.comments.utterances.theme %}{{ site.comments.utterances.theme }}{% elsif site.color_theme == 'dark' %}github-dark{% else %}github-light{% endif %}" |
And I guess utterances integration has the same problem as well?
This can be resolved if you can detect the actual theme color in *.liquid
, but I don't know how to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, I need to change the like github-dark-orange
, since it's not a valid option in giscus.
Finally |
Description
This PR adds giscus comment support.
giscus is very similar to utterances, but it uses GitHub Discussions, instead of Issues.
Screenshot
Link to comment on my blog
Link to comment created on the GitHub Discussion