Adding Comments with giscus

How I added GitHub Discussions-powered comments to this site in under 10 minutes, with zero build complexity and zero database management.

A stylish, wide-format technical illustration on a dark, geometric background. It features a glowing blue book icon on the left connected by flowing data lines and code snippets to a GitHub Octocat logo inside a speech bubble on the right. Below the icons, the text reads IMPLEMENTING GISCUS and POWERED BY GITHUB DISCUSSIONS in an elegant, modern font.
Generated by Google Gemini

I wanted comments on this site. Not because I expect a flood of discussion, but because it felt wrong to publish writing without a way for people to respond.

The usual path here is setting up a database, building moderation tools, handling spam, managing user accounts. I’ve done that before. I didn’t want to do it again.

Why giscus Works

giscus is a comments system that uses GitHub Discussions as the backend. No database. No user management. No moderation tools to build.

When someone comments on a blog post, it creates a GitHub Discussion linked to that page. People can comment directly on the site, or they can go to the repository and comment there. Either way works.

Here’s why I picked it:

No infrastructure to maintain. GitHub handles everything. Storage, auth, spam filtering, moderation tools. I just embed a script.

Lazy loading. The comments don’t load until you scroll near them. Zero impact on page speed.

Familiar UI. It looks like GitHub’s native comment system because it is GitHub’s comment system. People recognize it. They trust it.

Limited permissions. The giscus app only has access to Discussions. It can’t touch code, issues, or anything else in the repository.

Alternatives to giscus

I looked at two other options before choosing giscus.

utterances uses GitHub Issues instead of Discussions. That works, but Issues are for tracking bugs and tasks. Using them for blog comments feels wrong. Discussions are meant for conversations.

gitalk also uses Issues, and it requires compiling JavaScript bundles and managing npm packages. I didn’t want that complexity. giscus gives you a single script tag. That’s it.

The Setup Process

giscus has a configuration wizard at giscus.app that walks you through the setup. You pick your repository, choose a mapping strategy (I used pathname), set a theme, and it generates the script.

The whole setup is checkboxes and clear instructions. No guessing. No reading API docs.

I added the script to my blog post layout, updated my Content Security Policy headers to allow giscus.app, and shipped it.

Total time: less than 10 minutes.

Open Source Works

This is what good open source looks like. Someone built a tool that solves a real problem, documented it clearly, and made it trivial to use.

I didn’t have to compromise. I got comments without the database, moderation tools without the admin panel, user auth without the login system.

giscus just works. I recommend it.

If you want to see the implementation, check out the commit that added it.

Photo of Peter Chr. Jørgensen
Written by

Peter Chr. Jørgensen

Thanks for reading! I appreciate you taking the time. If you have thoughts, questions, or experiences to share, I'd love to hear them in the comments below.