How I chose and implemented Giscus for blog comments - a GitHub Discussions powered comment system with zero backend
After launching my portfolio with a blog, I wanted readers to engage - ask questions, share feedback, discuss content.
But I had constraints:
✅ No backend - Static site, keep it simple
✅ No database - Zero infrastructure overhead
✅ Developer-friendly - My audience is developers
✅ Markdown support - Code formatting matters
✅ Theme support - Must match dark/light mode
✅ Free - Open source preferred
✅ Privacy-friendly - No tracking, no ads
Most commenting systems fail at least one requirement:
Traditional solutions:
What I needed: A commenting system that feels native to developer portfolios - where technical discussions happen naturally, with code formatting, and zero infrastructure.
I evaluated three main options:
Pros:
Cons:
Verdict: Too bloated for a developer portfolio.
Pros:
Cons:
Verdict: Good for promotion, not for technical discussions.
Pros:
Cons:
Verdict: Close, but Giscus is better.
Giscus is Utterances 2.0 - powered by GitHub Discussions instead of Issues.
What makes it perfect:
1. Developer-First My audience is developers. They already have GitHub accounts. Zero friction.
2. Markdown + Code Full GitHub Flavored Markdown support. Code blocks, tables, everything.
3. Zero Infrastructure Comments live in GitHub Discussions. No database, no backend, no maintenance.
4. Reactions 👍 ❤️ 🎉 Quick feedback without full comments.
5. Ownership My repo, my discussions, my data. Export, backup, or migrate anytime.
6. Moderation GitHub's moderation tools built-in. Edit, delete, or lock discussions.
7. Theme Support Auto-switches between dark/light mode with my site.
8. Free Forever Open source, no ads, no tracking, no limits.
Comparison:
| Feature | Giscus | Utterances | Disqus | |
|---|---|---|---|---|
| Backend | None | None | Yes | Yes |
| Auth | GitHub | GitHub | ||
| Markdown | ✅ | ✅ | ❌ | ❌ |
| Reactions | ✅ | ❌ | ✅ | ✅ |
| Free | ✅ | ✅ | Ads | ✅ |
| Privacy | ✅ | ✅ | ❌ | ❌ |
| Uses | Discussions | Issues | Database | Tweets |
The winner: Giscus checks every box. 🎯
I had a private repo for my portfolio code. Giscus needs a public repo for discussions.
Options:
I went public because:
Why separate categories?
This allows Giscus to create discussions on your behalf.
Go to giscus.app↗ and fill in:
Repository:
yourusername/portfolio-repo
Page ↔️ Discussions Mapping:
Discussion Category:
Features:
Theme:
Copy the generated values:
data-repo-iddata-category-id (for each category)Key features:
<Giscus category="project" />Same component, different category. Clean and reusable!
What I got:
What it cost:
Problem: Testing locally creates discussions with localhost:3000 URLs.
Solution: Just delete them from GitHub Discussions. Production URLs will be separate.
Alternative: Disable Giscus in development:
Problem: Theme doesn't update when toggling dark/light mode.
Solution: Use useEffect to post message to iframe:
Problem: React hydration error with theme.
Solution: Use resolvedTheme from next-themes:
Create distinct categories for different content types:
Use "pathname" mapping for clean URLs:
/blog/post-1 → One discussion/blog/post-2 → Another discussionAdd data-loading="lazy" to improve performance.
Set data-input-position="top" so comment box is visible immediately.
Enable reactions for quick feedback without full comments.
Are Giscus IDs secrets? No! They're public identifiers, safe to commit to your repo.
What's actually secret:
Giscus IDs are like:
Before Giscus:
After Giscus:
Verdict: Negligible impact! 🚀
| Feature | Giscus | Utterances | Disqus | Commento |
|---|---|---|---|---|
| Backend | None | None | Yes | Yes |
| Auth | GitHub | GitHub | ||
| Markdown | ✅ | ✅ | ❌ | ❌ |
| Reactions | ✅ | ❌ | ✅ | ❌ |
| Free | ✅ | ✅ | Ads | Paid |
| Privacy | ✅ | ✅ | ❌ | ✅ |
Why not Utterances?
Giscus is basically Utterances 2.0!
Adding Giscus was one of the best decisions for my portfolio. It's:
If you're building a developer portfolio, blog, or documentation site, use Giscus. It just works.
Want to add Giscus to your site? Here's the TL;DR:
Total time: 30 minutes.
Have questions about Giscus? Drop a comment below! (Yes, powered by Giscus 😉)