Skip to content

Is it possible to get comment count? #113

Answered by laymonage
iacchus asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @iacchus, this is now possible by retrieving IMetadataMessage in a message event listener and accessing giscusData.discussion.totalCommentCount. You can follow this guide for more details.

You need to enable the "Emit discussion metadata" feature in the configuration:

or add data-emit-metadata="1" to your existing <script> tag.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@iacchus
Comment options

Comment options

You must be logged in to vote
2 replies
@iacchus
Comment options

@laymonage
Comment options

Answer selected by laymonage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants