Quickstart & Reference

ReplyHut Documentation

Add nested comments, zero-CAPTCHA contact forms, and timezone-smart calendar booking to any static site with one tiny Shadow DOM script.

1. Drop-in HTML Embed

Create a site in your Sites dashboard to get your pk_live_... key, then drop any of the three widgets into your HTML:

<!-- Nested Comments (with Markdown & upvotes) -->
<div data-replyhut="comments"
     data-site="pk_live_YOUR_KEY"
     data-page-id="/blog/my-post"
     data-theme="auto"></div>

<!-- Contact Us Form -->
<div data-replyhut="contact"
     data-site="pk_live_YOUR_KEY"
     data-theme="auto"></div>

<!-- Calendar Booking -->
<div data-replyhut="booking"
     data-site="pk_live_YOUR_KEY"
     data-theme="auto"></div>

<script async src="https://replyhut.com/widget.js"></script>

No-Code Website Builders (Squarespace, WordPress, Webflow, Wix, Framer, Carrd)

No developer required — use our 60-Second Visual Setup Wizard or paste your 2-line snippet into any builder:

Squarespace
Edit page → + Add Block → Code → paste snippet → Save. (On Personal plans, link to your hosted /c/pk_... page!)
WordPress
Open post/page → click + → search Custom HTML → paste snippet → Update.
Webflow / Framer
Drag an Embed (HTML) component onto your page → paste snippet → Publish.
Wix
+ Add Elements → Embed Code → Embed HTML → paste snippet → Publish.
Carrd
Click + → Embed → Type: Code, Style: Inline → paste snippet → Publish.
Ghost / Shopify
Ghost: type /html and paste. Shopify: Add section → Custom Liquid and paste.

2. Static Site Generator Recipes

Hugo / Jekyll
<!-- Hugo: layouts/_default/single.html -->
<div data-replyhut="comments"
     data-site="pk_live_YOUR_KEY"
     data-page-id="{{ .RelPermalink }}"></div>
<script async src="https://replyhut.com/widget.js"></script>

<!-- Jekyll: _layouts/post.html -->
<div data-replyhut="comments"
     data-site="pk_live_YOUR_KEY"
     data-page-id="{{ page.url }}"></div>
Astro / Next.js / React
<!-- Astro: src/layouts/BlogPost.astro -->
<div data-replyhut="comments"
     data-site="pk_live_YOUR_KEY"
     data-page-id={Astro.url.pathname}></div>
<script is:inline async
  src="https://replyhut.com/widget.js"></script>

3. Custom CSS Theming & Markdown

Even though ReplyHut renders inside an isolated Shadow DOM, CSS custom properties pierce the Shadow boundary. Style any widget container to match your brand:

<style>
  [data-replyhut] {
    --pb-accent: #7c3aed;        /* Primary buttons & links */
    --pb-accent-hover: #6d28d9;  /* Button hover state */
    --pb-radius: 10px;           /* Card & input corner radius */
    --pb-font: "Inter", sans-serif;
  }
</style>

Attributes: data-theme="light | dark | auto", data-accent="#0052ff", data-page-id="/slug" (defaults to location.pathname).
Comment Markdown: Supports **bold**, *italic*, `inline code`, and [links](https://...) with strict XSS sanitization.

4. Verifying HMAC-SHA256 Webhooks

Every webhook request includes X-ReplyHut-Event and X-ReplyHut-Signature: t=<unix>,v1=<hex>. Verify the signature against your whsec_... secret:

import hashlib, hmac

def verify_replyhut(secret: str, header: str, raw_body: bytes) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(",") if "=" in p)
    msg = f"{parts['t']}.".encode() + raw_body
    expected = hmac.new(secret.encode(), msg, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts.get("v1", ""))

5. Migrating from Disqus & Exporting Data

Already have comments on Disqus? Export your Disqus WXR XML file and upload it directly in your Site Settings page — ReplyHut automatically preserves page paths, timestamps, authors, and nested parent/child replies. You can also export all your comments, contacts, and bookings as JSON or CSV at any time with zero lock-in.