Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add giscus #484

wants to merge 2 commits into from

Conversation

copyrat90
Copy link

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
2025-01-22 23-43-03

README.md Outdated Show resolved Hide resolved
@im-coder-lg
Copy link
Contributor

im-coder-lg commented Jan 25, 2025

Finally
I thought of doing this a long time ago, but there was no time
I added Utterances, and it doesn't recognize auto as a theme, so that kind of thing I added in myself/explored around and found it, hard to remember now.
Wonder what happened to "cusdis"

data-reactions-enabled="{% if site.comments.giscus.reactions-enabled %}{{ site.comments.giscus.reactions-enabled }}{% else %}1{% endif %}"
data-emit-metadata="{% if site.comments.giscus.emit-metadata %}{{ site.comments.giscus.emit-metadata }}{% else %}0{% endif %}"
data-input-position="{% if site.comments.giscus.input-position %}{{ site.comments.giscus.input-position }}{% else %}bottom{% endif %}"
data-theme="{% if site.comments.giscus.theme %}{{ site.comments.giscus.theme }}{% elsif site.color_theme == 'dark' %}dark{% else %}light{% endif %}"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you have a script here you could also set color_theme based on the js var from the header too 🤔
That way it would be dynamic and default to the config value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants