Skip to main content
DropComments Hugo

Add Comments to Your Hugo Site

Hugo is fast — your comment system should be too. DropComments drops into any Hugo theme with two lines of HTML. No build steps, no plugins, no backend.

How to add comments to Hugo

Step 1: Create a free DropComments account

Sign up at dropcomments.net and register your Hugo site's domain. You'll get a unique Site ID.

Step 2: Add the embed snippet to your single.html layout

Open your theme's single post layout — typically layouts/_default/single.html or layouts/posts/single.html. Paste the snippet where you want comments to appear:

layouts/_default/single.html
<!-- Hugo content renders above -->
{{ .Content }}

<!-- DropComments widget -->
<div id="dropcomments"></div>
<script src="https://dropcomments.net/embed.js"
        data-site-id="your-site-uuid"></script>

Step 3: Rebuild and deploy

Run hugo to rebuild your site. Comments will appear on all single post pages automatically.

Hugo partials tip

For cleaner code, create a partial at layouts/partials/comments.html with the embed snippet, then include it with {{ partial "comments.html" . }}.

Why Hugo users choose DropComments

  • No server-side language needed — Hugo stays static
  • No ads, no visitor tracking — GDPR friendly by default
  • Built-in spam detection — no CAPTCHA needed
  • Free — no paid plan to remove ads