Docs — Integrations
Works with App Router and Pages Router. Drop in a script, mount a container, and you are live — with moderation, translation and AI replies.
Create a site in Admin, verify your domain, copy the Site ID and Google Client ID.
In your layout or page, load the stylesheet and initialize the widget. No extra backend required.
Place <div id="comment"></div> where you want comments. Each page auto-uses its pathname as the thread key.
Replace YOUR_GOOGLE_CLIENT_ID and YOUR_SITE_ID. For Pages Router, move the same script to _app.tsx.
// app/layout.tsx — load once
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<div id="comment" style={{ minHeight: 360 }} />
<link rel="stylesheet" href="https://unpkg.com/@roudanio/awesome-comment@latest/dist/style.css" />
<Script type="module" strategy="afterInteractive">{`
import { getInstance } from 'https://unpkg.com/@roudanio/awesome-auth@latest/dist/awesome-auth.js';
import Comment from 'https://unpkg.com/@roudanio/awesome-comment@latest/dist/awesome-comment.js';
const auth = getInstance({ googleId: "YOUR_GOOGLE_CLIENT_ID", root: "https://awesomecomment.org/api/site/auth" });
Comment.init(document.querySelector('#comment'), {
siteId: "YOUR_SITE_ID",
apiUrl: "https://awesomecomment.org",
awesomeAuth: auth,
postId: location.pathname,
locale: navigator.language,
});
`}</Script>
</body>
</html>
);
}postId to scope threads (default: location.pathname). For i18n sites, include locale in postId.locale to navigator.language for auto translation.Yes. The widget is pure client-side and fetches from https://awesomecomment.org. Static pages (next export) work fine.
Reserve min-height for #comment (e.g. 360px) and style with our CSS. See Examples for a live demo.