Add commenting to Astro blog with Giscus
A guide to how I added commenting to this blog with Giscus.
I initially added commenting to this blog using Utteranc.es which uses GitHub issues for comments, then I later discovered Giscus on this blog post. Basically, giscuss does the same thing as utterances but it uses GitHub discussions instead of issues. The advantage with this is that they have a threading feature and it’s easier to see what’s going on in the thread. It also frees up issues to be used for actual issues.
Setup
Setup is pretty straight forward. Just follow the guide on the giscus website, fill out the configuration and you should be given code that looks something like this:
But just throwing this into Astro won’t work. So you’ll need to create a new Astro component that wraps the giscus code. Let’s call it Giscus
.
Then you can take the Giscus
component and add it to your blog post as you would any other component. And that’s it!
Try it out below!