feat(web): add CrawlProof ad unit to /blog/*
Some checks failed
CI / build (push) Has been cancelled
test / test (push) Has been cancelled

Reusable AdUnit component (div[data-cp-ad] + ad.js via next/script) placed
in-content on the blog index and post pages, scoped to /blog/* only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-07-08 10:40:00 +00:00
parent 8107140228
commit d76dd498f2
3 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,20 @@
import type { ReactNode } from "react";
import Script from "next/script";
// CrawlProof ad unit, scoped to the pages that render it (currently /blog/*).
// The loader is deduped by src, so mounting <AdUnit /> on multiple routes only
// injects one https://crawlproof.com/ad.js.
export function AdUnit({
slot,
format = "banner_300x250",
}: {
slot: string;
format?: string;
}): ReactNode {
return (
<>
<div data-cp-ad data-slot={slot} data-format={format} />
<Script src="https://crawlproof.com/ad.js" strategy="afterInteractive" />
</>
);
}