Disfora
Docs menu

Add comments to an Eleventy site

Add the container and the script to the layout your posts use. On the eleventy-base-blog starter that's one file, and every post gets its own comment thread.

Before you start

  • A Disfora project for your site. Create a free account, start a project and enter your domain. You'll verify it once the code is live.

1. Add it to your post layout

Open _includes/layouts/post.njk and add this after {{ content | safe }}:

_includes/layouts/post.njk
{{ content | safe }}

{% if comments !== false %}
  <div data-disfora-comments></div>
  <script src="https://disfora.com/public/disfora.js" async></script>
{% endif %}

A post with comments: false in its front matter skips the comments.

Your own layouts

If your site doesn't use the starter, find the layout your posts name in their front matter or in their folder's data file, and add the same lines after it outputs content. In a Liquid layout, use {% unless comments == false %} … {% endunless %} instead.

Check it on your site

Disfora only loads on the domain in your project, so localhost:8080 won't show it. Deploy, then verify your domain if you haven't yet, and open a post on your live site.

Ask a question

Something missing or unclear? Ask here and we'll answer in the thread.

Updated November 2026