Skip to content

Show CrawlProof ad units on /blog/** only - #112

Merged
ralyodio merged 2 commits into
masterfrom
crawlproof/install-ad-embed-94cd644a-mrza6dgy
Jul 24, 2026
Merged

ralyodio merged 2 commits into
masterfrom
crawlproof/install-ad-embed-94cd644a-mrza6dgy

Conversation

@crawlproof

@crawlproof crawlproof Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Adds the CrawlProof ad units so this site can show network ads and earn crypto for clicks — scoped to the blog.

  • Slot: 94cd644a-bcc2-4bba-ab66-b4a89f3727cc (overridable via NEXT_PUBLIC_AD_SLOT_ID)
  • Ads render on /blog and /blog/[slug] only, via app/(marketing)/blog/layout.tsx. Nothing outside /blog/** — marketing pages, the app, and email are untouched. /blog/rss.xml is a route handler, so the feed stays ad-free.
  • Two units below the post/list: an auto-sized banner (leaderboard on desktop, mobile banner on narrow screens) and a native text link.

Changed from the auto-installed version: the installer put the embed in lib/email.ts, which would have shipped the markup inside every transactional email (where the script never runs) and shown nothing on the site. That's reverted.

components/ads/ad-unit.tsx re-triggers window.crawlproofAds.scan() on mount — /ad.js only auto-scans once at load, so units mounted by client-side navigation need the manual trigger it exposes.

Each unit renders inside a sandboxed iframe and never blocks page load. Manage the slot at https://crawlproof.com/ads/slots

@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

The auto-installer injected the embed into lib/email.ts, so the units
would have rendered inside every transactional email we send (where the
script never runs and the markup is just dead weight) and nowhere on the
site itself.

Revert that and mount the units in a /blog layout instead: it covers the
index and every post, and nothing outside /blog/**. The RSS route is a
route handler, so the feed stays ad-free.

AdUnit re-triggers /ad.js's scan on mount — the script only auto-scans
once at load, so units arriving via client-side navigation need the
manual trigger it exposes. Format is left unset so each unit sizes to
the column: leaderboard on desktop, mobile banner on narrow screens.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ralyodio ralyodio changed the title Add CrawlProof ad units Show CrawlProof ad units on /blog/** only Jul 24, 2026
@ralyodio
ralyodio merged commit f1065ae into master Jul 24, 2026
8 checks passed
ralyodio added a commit that referenced this pull request Sep 28, 2026
…way (#330)

Supabase SSR auth sets several chunked sb-*-auth-token cookies on sign-in;
they overflow nginx's default proxy_buffer_size, which logs "upstream sent
too big header" and turns a successful login into a 502. Same fix as the
rest of dev2 (cli-tools #112). Applied to the live vhost in place, since
certbot owns its TLS lines.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant