Adding a Comment Section to Your Blog with giscus
This article is Day 5 of coins Advent Calendar 2024.
What is giscus?
From the official site:
A comments system powered by GitHub Discussions. Let visitors leave comments and reactions on your website via GitHub! This project was inspired by utterances.
That’s exactly it. The DB is managed by GitHub, so you just need to embed it in a static site. Self-hosting is also possible.
Setup
Set up the GitHub App. Create a new (public) repository and install it there. Then enable Discussions.
Check the official site for details.

Enter your repository name, and if OK, configure the settings below.

Just paste the generated code and it should work. Adjust styles as needed.
Preview

Try commenting:

It’s reflected in Discussions too.
Conclusion
I wrote an extra article since CentRa tweeted “If spots aren’t filled, I’ll have to write Nix introductions every day” but hasn’t been writing articles.