A Debaty post on your own site
Embed a single post with one copy-paste snippet — no cookies, no tracking, so your visitors never have to click away a cookie banner for it.
The snippet
Paste this where the post should appear. The blockquote is the content itself — readable by search engines, RSS readers and screen readers, even with JavaScript off. The script replaces it with a live, auto-resizing card.
<blockquote class="debaty-embed" data-debaty-post="<post-id>">
<p>De posttekst — leesbaar zonder JavaScript.</p>
<p>— Naam (@handle) · <a href="https://debaty.com/nl/bubbel/<post-id>">https://debaty.com/nl/bubbel/<post-id></a></p>
</blockquote>
<script async src="https://debaty.com/embed.js" charset="utf-8"></script>You never have to build this by hand: every post has "Embed" in its share menu, and the code comes out ready-made — post text in the blockquote included.
Embedding a liveblog
Besides a post you can embed an entire liveblog: use data-debaty-liveblog with the liveblog id instead of data-debaty-post. The card shows the title, the person running it, the three newest updates and a link to the full report, and refreshes itself every thirty seconds while the liveblog is open — without cookies and without requests to any third party. Once the liveblog closes, refreshing stops and the card shows the closing summary.
<blockquote class="debaty-embed" data-debaty-liveblog="<liveblog-id>">
<p><strong>De titel van het liveblog</strong></p>
<p>De intro — leesbaar zonder JavaScript.</p>
<p>— Naam (@handle) · <a href="https://debaty.com/nl/liveblog/<liveblog-id>">https://debaty.com/nl/liveblog/<liveblog-id></a></p>
</blockquote>
<script async src="https://debaty.com/embed.js" charset="utf-8"></script>How it works
embed.js (±2 kB, dependency-free) finds blockquotes with data-debaty-post and replaces them with an iframe to that post's embed page. The iframe measures itself and reports its height via postMessage; embed.js only accepts such a message from our origin and only for an iframe it placed itself. Links in the card open Debaty in a new tab.
No cookies, no tracking
The embed document sets no cookie, reads no session and makes no third-party request whatsoever — system fonts, its own CSS, images only from our own origin. There is nothing to consent to: you can place the embed without cookie-banner obligations, and it keeps working in browsers that block third-party cookies entirely (like Safari).
Building the iframe yourself instead of via embed.js? Give it this sandbox attribute — the card needs nothing more:
<iframe src="https://debaty.com/embed/post/<post-id>"
sandbox="allow-scripts allow-same-origin allow-popups"></iframe>Theme and language
By default the card follows the visitor's colour scheme (light/dark). Pin it with data-debaty-theme="light" or "dark" on the blockquote; pick the card-label language with data-debaty-lang="nl" or "en".
oEmbed
For CMSes and editors that speak oEmbed (WordPress, Mastodon-alikes, note apps) there is an endpoint per oembed.com: type rich, with the snippet in html. height is null — the height is only known once the content renders; embed.js measures it live. maxwidth is respected up to our ceiling of 600.
GET /api/oembed?url=https%3A%2F%2Fdebaty.com%2Fnl%2Fbubbel%2F<post-id>&format=json{
"version": "1.0",
"type": "rich",
"provider_name": "Debaty",
"author_name": "…",
"html": "<blockquote class=\"debaty-embed\" …>…</blockquote><script async src=\"…/embed.js\"></script>",
"width": 600,
"height": null
}Every public post page carries the discovery link (<link rel="alternate" type="application/json+oembed">), so an oEmbed consumer only needs the ordinary permalink.
What about the publisher widget?
These are two different products. The post embed (this page) shows one existing Debaty post, placeable anywhere, no registration. The publisher widget is a comment panel under your own articles: your readers' comments, with a moderation queue and a domain allowlist, managed through your publisher account.
To the publisher widget →