How to Add Comments to Jekyll: Disqus vs Giscus vs Utterances
Compare the three best comment systems for Jekyll sites — Disqus, Giscus, and Utterances. Setup guides, pros and cons, and which to choose.
Jekyll doesn’t have a built-in comment system — it’s a static site generator. But you have three solid options that work well with static sites. Here’s how each one works and which to choose.
The Three Options at a Glance
| Disqus | Giscus | Utterances | |
|---|---|---|---|
| Backend | Disqus servers | GitHub Discussions | GitHub Issues |
| Free plan | Yes (with ads) | Yes (free) | Yes (free) |
| Requires GitHub | No | Yes | Yes |
| Privacy | Poor | Good | Good |
| Spam control | Built-in | GitHub moderation | GitHub moderation |
| Anonymity | Disqus account or guest | GitHub account required | GitHub account required |
| Setup difficulty | Easy | Medium | Easy |
Option 1: Disqus
Disqus is the most well-known comment system for static sites. It hosts all comments on its servers and loads them via a JavaScript embed.
Pros
- No GitHub account required for commenters
- Built-in spam filtering and moderation dashboard
- Comment count display on post lists
- Supports anonymous guest comments
Cons
- Ads on free plan — Disqus shows ads in the comment area unless you pay ($11+/month)
- Privacy concerns — Disqus tracks users across sites and shares data with advertisers
- Performance hit — The Disqus script adds ~300KB to page load
- Data lock-in — Your comments live on Disqus servers, not yours
Setup
- Create a free account at disqus.com
- Create a new site and note your shortname
- Add to
_config.yml:disqus: shortname: your-shortname - Create
_includes/comments-disqus.html: ```html
{% if page.comments != false %}
{% endif %}
5. Include in your post layout before `</article>`:
```liquid
{% include comments-disqus.html %}
Option 2: Giscus
Giscus uses GitHub Discussions as a comment backend. Comments appear both on your site and in your repo’s Discussions tab.
Pros
- Completely free — no ads, no paid plans
- Privacy-friendly — no tracking, no third-party data sharing
- Beautiful UI — light/dark mode, reactions (👍 ❤️ 🎉)
- Markdown support — commenters can use full GitHub Markdown
- You own the data — comments live in your GitHub repo
Cons
- Requires a GitHub account to comment — limits casual commenters
- Slightly more complex setup than Utterances
Setup
Step 1: Enable GitHub Discussions on your repository. Go to repo Settings → General → Features and check Discussions.
Step 2: Install the Giscus app on your repository.
Step 3: Go to giscus.app to generate your configuration. Fill in your repository name and choose a mapping (recommended: pathname).
You will get a script like:
<script src="https://giscus.app/client.js"
data-repo="username/repo"
data-repo-id="R_xxxxx"
data-category="Comments"
data-category-id="DIC_xxxxx"
data-mapping="pathname"
data-reactions-enabled="1"
data-theme="preferred_color_scheme"
crossorigin="anonymous"
async>
</script>
Step 4: Create _includes/comments-giscus.html with that script.
Step 5: For dark mode support, use the data-theme attribute dynamically:
<script>
const theme = localStorage.getItem('theme') === 'dark' ? 'dark' : 'light';
document.write(`<script src="https://giscus.app/client.js"
data-repo="username/repo"
data-repo-id="R_xxxxx"
data-category="Comments"
data-category-id="DIC_xxxxx"
data-mapping="pathname"
data-theme="${theme}"
crossorigin="anonymous"
async><\/script>`);
</script>
Step 6: Add to your post layout:
{% if page.comments != false %}
{% include comments-giscus.html %}
{% endif %}
Option 3: Utterances
Utterances uses GitHub Issues as its backend. Each page gets a GitHub Issue, and comments are issue replies.
Pros
- Free and ad-free
- Simplest setup — one script tag
- Good for developer-oriented blogs where commenters have GitHub accounts
Cons
- Requires GitHub account to comment
- Comments go into GitHub Issues — can look messy in your repo
- No reactions or rich UI (compared to Giscus)
- GitHub Issues was not designed for comments, and it shows
Setup
- Install the Utterances app on your repository
- Create
_includes/comments-utterances.html: ```html
{% if page.comments != false %} {% endif %}
3. Add to your post layout.
For dark mode:
```html
<script src="https://utteranc.es/client.js"
repo="username/repo-name"
issue-term="pathname"
theme="github-dark"
crossorigin="anonymous"
async>
</script>
Which Should You Choose?
Choose Giscus if:
- Your audience has GitHub accounts (developers, tech readers)
- You care about privacy and not having ads
- You want reactions and a modern UI
- You want the best long-term option
Choose Disqus if:
- Your audience is non-technical and won’t have GitHub accounts
- You need anonymous/guest commenting
- You don’t mind the free plan ads (or can afford the paid plan)
Choose Utterances if:
- You want the simplest possible setup
- Your site is developer-focused and GitHub Issues don’t bother you
- You are already using GitHub Issues for other tracking
Our recommendation: Giscus for most developer blogs. The UI is better than Utterances, it’s privacy-friendly, completely free, and requiring a GitHub account is not a drawback for a technical audience.
Making Comments Optional Per Post
For posts where you don’t want comments, add to front matter:
comments: false
This works with the {% if page.comments != false %} check in all the includes above.
Browse Jekyll themes on JekyllHub — several themes include pre-configured comment system support.
Self-hosted comment alternatives
If neither GitHub-dependent options nor Disqus suits your needs, two self-hosted alternatives are worth considering.
Remark42 is an open-source comment system that you host on your own server. It supports multiple authentication providers (GitHub, Google, Twitter, Facebook, anonymous), email notifications, Markdown in comments, moderation, spam filtering, and import from Disqus. The design is clean and customisable. The catch: you need a server to run it on (a $5/month VPS is sufficient) and some comfort with Docker or Linux server administration. For a Jekyll site hosted on GitHub Pages, this adds operational complexity that most users would rather avoid — but for sites with strong privacy requirements or large comment volumes, owning your comment infrastructure is valuable.
Cusdis is a lightweight, privacy-first alternative to Disqus that can be self-hosted or used via their hosted service. The free hosted tier is limited (100 comments per month), but the open-source version you host yourself has no limits. Unlike Remark42, Cusdis does not require user accounts — visitors leave their name and email directly, without GitHub or social login. This makes it accessible to non-developer audiences while maintaining better privacy than Disqus.
A third option some Jekyll bloggers adopt: no comment system at all, with readers directed to email or social media instead. A closing line like “Reply to this post by email at hello@example.com or on Twitter @handle” channels conversation to places you already monitor, without adding JavaScript, third-party dependencies, or spam management overhead. For blogs with smaller audiences, this is often the most practical approach.
Moderating comments effectively
Whichever system you choose, developing a moderation habit before comments accumulate is important. Unmoderated comment sections deteriorate quickly.
For Giscus and Utterances, GitHub is your moderation interface. Pin important discussions, hide off-topic threads, and use GitHub’s reporting tools for spam. GitHub Discussion moderation is lightweight but functional.
For Disqus, the moderation dashboard provides spam filtering, comment approval queues, and user banning. Enable the moderation queue for new commenters (comments require approval before appearing) until you trust your audience’s behaviour — this significantly reduces the likelihood of inappropriate content reaching your site.
For all systems, set clear expectations about what kind of discussion is welcome. A brief community note in your blog’s footer or about page — “Comments are moderated and must be constructive” — sets the tone and reduces friction for both commenters and you as the moderator.
Loading comments conditionally for performance
All three comment systems load third-party JavaScript. Even Giscus, the lightest option, adds a network request. For performance-sensitive sites, load the comment widget only when the user scrolls to the comment section, rather than on every page load.
// Lazy-load Giscus when the comment container enters the viewport
const commentsContainer = document.getElementById('comments');
if (commentsContainer) {
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const script = document.createElement('script');
script.src = 'https://giscus.app/client.js';
script.dataset.repo = 'username/repo';
script.dataset.repoId = 'R_xxxxx';
script.dataset.category = 'Comments';
script.dataset.categoryId = 'DIC_xxxxx';
script.dataset.mapping = 'pathname';
script.dataset.reactionsEnabled = '1';
script.dataset.theme = localStorage.getItem('theme') === 'dark' ? 'dark' : 'light';
script.crossOrigin = 'anonymous';
script.async = true;
commentsContainer.appendChild(script);
observer.unobserve(entry.target);
}
});
}, { threshold: 0.1 });
observer.observe(commentsContainer);
}
This approach delays loading the comment script until the user actually scrolls toward the comment section — which on long posts, many readers never do. The improvement to Time to Interactive and Total Blocking Time is measurable, particularly on mobile where comment scripts compete with the main thread.
Wrap the <div id="comments"> in your post layout instead of the raw script tag, and include the JavaScript above in your assets/js/post.js file. The lazy-loading pattern works identically for all three comment systems by adjusting the script attributes.
Whether you choose the simplicity of Giscus for a developer audience, the broad accessibility of Disqus for a general readership, or the self-hosted control of Remark42, adding comments gives your readers a direct channel to engage with your content — and that engagement, when moderated thoughtfully, consistently makes a blog better.
Sustaining a comment community
The technical setup for comments is the easy part. The harder and more valuable work is cultivating a comment community worth having. This means replying to every comment in the first month, however small the conversation. It means asking a question at the end of each post to give readers a specific prompt. It means being visibly present in the comment section, not just publishing and disappearing.
Readers return to blogs where the author engages with them. A single thoughtful author reply to a comment consistently generates two or three follow-up comments from other readers — it signals that the conversation is live and worth joining. Over several months, this habit compounds into a community where readers engage not just with the author but with each other.
Set a notification for new comments through whatever mechanism your comment system provides — Giscus can notify you via GitHub notifications, Disqus via email, Remark42 via webhook. Treat comment notifications with the same urgency you give email from important contacts, at least during the early months when the community is forming. The effort required at this stage is minimal; the long-term community value is significant.
Moderation policy also matters. A brief, friendly comment policy pinned at the top of the comment section — one sentence about staying constructive and on-topic — reduces moderation burden and sets expectations clearly. Readers who see comments being actively moderated trust the community more, which paradoxically increases participation from thoughtful commenters while reducing participation from the disruptive ones.
The combination of a technically sound comment implementation and active community stewardship turns a one-way publishing channel into a genuine conversation — which is what distinguishes a blog that people remember from one they read and forget.