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

Get the number of comments outside of the blog page #145

Open
cesarsotovalero opened this issue Jul 24, 2021 · 3 comments · May be fixed by #198
Open

Get the number of comments outside of the blog page #145

cesarsotovalero opened this issue Jul 24, 2021 · 3 comments · May be fixed by #198
Labels
someday/maybe Cannot be decided at the moment.

Comments

@cesarsotovalero
Copy link

cesarsotovalero commented Jul 24, 2021

I would like to get the number of comments made in a blog post. The goal is to show something like this:

the number of comments in the post

This is a good feature to have.
When looking at the comments counter, I just see a link to the discussion in the repo.

@laymonage
Copy link
Member

laymonage commented Jul 24, 2021

Hey, thanks for the suggestion. This was also brought up in #113 (reply in thread). As much as I like to have this, I don't see how this could be implemented elegantly from giscus' side. This would need a separate script that could recognize and handle all the blog posts on the current page. I haven't thought of a clean design to implement this.

If you have any ideas for the implementation, feel free to let me know. Otherwise, I'd suggest calling GitHub's API directly.

@laymonage laymonage added the someday/maybe Cannot be decided at the moment. label Jul 24, 2021
@cesarsotovalero
Copy link
Author

Hi @laymonage,
Thanks for your reply. It seems that at the moment the GitHub API doesn't have a good support for Discussions. Therefore, a separate script that caches metadata from all the posts on the website is highly needed. I hope to see this feature available someday in gisqus.

@typeofweb
Copy link
Contributor

I've implemented this for my blog. Maybe someone will find it helpful: https://github.com/typeofweb/typeofweb.com/blob/main/generateCommentsCount.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
someday/maybe Cannot be decided at the moment.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants