Guides

Add comments to Jekyll

Add comments to a Jekyll static blog with a small include and one embed, no database to run yourself.

Add comments to Jekyll

Static sites and the comment problem

Jekyll builds your blog into plain HTML files. That is why it is fast and cheap to host, and it is also why it cannot store comments on its own. There is no server sitting behind your posts to accept a form submission. To add comments to a Jekyll site, you bring in something that handles the storage for you and loads on the client.

A hosted comment embed fits that model well. Your build stays static, the widget loads in the browser, and the discussion attaches to each post's URL. You add one include to your layout and you are done.

The include

Create a file at _includes/comments.html with the embed. Gabden keys every thread to the page's canonical URL, so you do not have to pass an ID by hand.

<div id='gabden-conversations'></div>
<script async src='https://YOUR-SITE.gabden.com/conversations.js'
  data-page='canonical'
  data-theme='auto'></script>

Get your own Gabden subdomain (the YOUR-SITE part of the URL) from the dashboard after you create a free account. Then reference the include from your post layout, usually _layouts/post.html, right after the article content:

{{ content }}
{% include comments.html %}

Rebuild the site and every post gets a thread. Because Jekyll produces a full page per post, there are no single-page-app quirks to work around: each URL is its own document with its own thread.

Only on posts, not every page

Put the include in the post layout rather than the default layout so comments show under articles but not under your home page, tags, or about page. If you want finer control, Gabden also lets you turn comments off on chosen URLs from the dashboard, which is handy for the odd page that should stay quiet.

Set a clean canonical

Threads follow the canonical URL. Make sure your post front matter and any permalink settings produce one stable address per post. If you serve the same post at more than one path, set the canonical so comments do not split. Most Jekyll setups get this right by default, but confirm it on a live post before you migrate an audience.

Moderation without a backend

The nice thing about a hosted embed is that you get moderation without running anything. Choose how strict to be: pre-moderate everything at first, auto-approve returning verified people once you trust them, or moderate only anonymous users. A blocked-word filter and a spam queue catch the rest, and none of it lives on your server.

Readers can join without an account. They post anonymously, comment as a guest with a name and email, or sign in with Google or GitHub. For a developer-leaning Jekyll audience, GitHub sign-in usually feels at home. Threaded replies and reactions (like and heart) round out the interaction, and team roles with per-module permissions let you hand moderation to someone else without sharing the whole account.

If you run several Jekyll sites, each one gets its own Gabden subdomain and its own settings, so a personal blog and a project site do not share a moderation queue or a theme. You add the same include to each and swap the key.

Keeping the site fast

People pick Jekyll partly for speed, so the last thing you want is a heavy comment script undoing that. Gabden's embed is about 10KB and loads asynchronously, so the page renders first and the widget fills in. If you have measured your Core Web Vitals, that difference matters. More on that in how your comment system affects performance and SEO.

Privacy and ownership

No tracking cookies, no fingerprinting, no cross-site tracking. Analytics are anonymous and aggregate. You own the comment data and can export it as JSON or CSV, so if you ever move platforms you take the discussion with you. Light and dark themes with presets let the widget match a minimal Jekyll design. Full configuration is in the docs.

Join the discussion