From 7171c2cdeb144de7b6a84a5cdaa4993c6da11aeb Mon Sep 17 00:00:00 2001
From: Anthony Ettinger
Date: Tue, 20 Oct 2026 23:06:24 -0700
Subject: [PATCH] No ads on the homepage; low-profile text-link ads elsewhere
(#251)
- Homepage: removed the 300x250 ad.network unit, its CSS, its rescan effect and the home-only ad.js tag (the ad.network meta verification tag stays).
- Blog index and posts: the single unit is now text_link (AdUnit default), full width with an 8px margin, no centred 300x250 box.
Co-authored-by: Claude Opus 5.5
---
apps/logicsrc-web/src/app/[[...slug]]/page.tsx | 2 --
apps/logicsrc-web/src/app/blog/[slug]/page.tsx | 4 +---
apps/logicsrc-web/src/app/blog/page.tsx | 4 +---
apps/logicsrc-web/src/components/ad-unit.tsx | 7 ++++---
.../src/components/home-interactivity.tsx | 17 -----------------
apps/logicsrc-web/src/lib/ad-network.ts | 10 ++--------
apps/logicsrc-web/src/lib/page-markup.ts | 2 --
apps/logicsrc-web/src/styles.css | 13 -------------
8 files changed, 8 insertions(+), 51 deletions(-)
diff --git a/apps/logicsrc-web/src/app/[[...slug]]/page.tsx b/apps/logicsrc-web/src/app/[[...slug]]/page.tsx
index c4c88c43..0e49e059 100644
--- a/apps/logicsrc-web/src/app/[[...slug]]/page.tsx
+++ b/apps/logicsrc-web/src/app/[[...slug]]/page.tsx
@@ -5,7 +5,6 @@ import { renderPageMarkup } from "@/lib/page-markup";
import { pageMetadata, specMetadata } from "@/lib/page-meta";
import { HomeInteractivity } from "@/components/home-interactivity";
import { siteFooterHtml } from "@/lib/site-footer";
-import Script from "next/script";
import { AD_NETWORK_CODE } from "@/lib/ad-network";
// The legacy SPA served the same single page for every top-level path and just
@@ -59,7 +58,6 @@ export default async function Page({
<>
- {!slug?.length && }
>
);
}
diff --git a/apps/logicsrc-web/src/app/blog/[slug]/page.tsx b/apps/logicsrc-web/src/app/blog/[slug]/page.tsx
index e3246a7f..dc0bd228 100644
--- a/apps/logicsrc-web/src/app/blog/[slug]/page.tsx
+++ b/apps/logicsrc-web/src/app/blog/[slug]/page.tsx
@@ -145,9 +145,7 @@ export default async function BlogPostPage({
>
) : null}
-
+
{post.featured_image?.url ? (
// eslint-disable-next-line @next/next/no-img-element
{
-
+
{posts.length === 0 ? (
No posts yet.
diff --git a/apps/logicsrc-web/src/components/ad-unit.tsx b/apps/logicsrc-web/src/components/ad-unit.tsx
index bdcd344b..fcb3b4db 100644
--- a/apps/logicsrc-web/src/components/ad-unit.tsx
+++ b/apps/logicsrc-web/src/components/ad-unit.tsx
@@ -1,19 +1,20 @@
import type { ReactNode } from "react";
import Script from "next/script";
-// CrawlProof ad unit, scoped to the pages that render it (currently /blog/*).
+// CrawlProof ad unit, scoped to the pages that render it (currently /blog/*):
+// the low-profile 40px text_link line, one per page, never on the home page.
// The loader is deduped by src, so mounting on multiple routes only
// injects one https://crawlproof.com/ad.js.
export function AdUnit({
slot,
- format = "banner_300x250",
+ format = "text_link",
}: {
slot: string;
format?: string;
}): ReactNode {
return (
<>
-
+
>
);
diff --git a/apps/logicsrc-web/src/components/home-interactivity.tsx b/apps/logicsrc-web/src/components/home-interactivity.tsx
index a1376409..5dff8237 100644
--- a/apps/logicsrc-web/src/components/home-interactivity.tsx
+++ b/apps/logicsrc-web/src/components/home-interactivity.tsx
@@ -115,22 +115,5 @@ export function HomeInteractivity(): null {
};
}, []);
- // The home page ad.network unit lives in the server-rendered markup, and
- // crawlproof's ad.js scans once at DOMContentLoaded. A client-side visit to
- // "/" (from /blog, say) re-renders the markup after that scan, so ask the
- // loader to scan again, retrying briefly while the script is still loading.
- useEffect(() => {
- if (!document.querySelector("[data-ad-network]")) return;
- let tries = 0;
- const timer = window.setInterval(() => {
- const ads = (window as { crawlproofAds?: { scan?: () => void } }).crawlproofAds;
- if (ads?.scan || ++tries >= 20) {
- window.clearInterval(timer);
- ads?.scan?.();
- }
- }, 250);
- return () => window.clearInterval(timer);
- }, []);
-
return null;
}
diff --git a/apps/logicsrc-web/src/lib/ad-network.ts b/apps/logicsrc-web/src/lib/ad-network.ts
index f05c4614..bde0498e 100644
--- a/apps/logicsrc-web/src/lib/ad-network.ts
+++ b/apps/logicsrc-web/src/lib/ad-network.ts
@@ -1,11 +1,5 @@
// ad.network publisher claim for logicsrc.com. The
// tag (home page metadata) lets ad.network verify ownership from the
-// server-rendered HTML; the aside is the home page unit, filled in place by
-// crawlproof.com/ad.js. Blog pages keep their own CrawlProof slot (AdUnit).
+// server-rendered HTML. The home page carries no ad unit; blog pages keep their
+// own CrawlProof slot (AdUnit).
export const AD_NETWORK_CODE = "xPEOavNsIGrivkMw";
-export const HOME_AD_SLOT = "efda46e1-bbc3-42e7-8fd0-2640bdd8a90f";
-
-/** The home page unit, placed between the hero and the first band. */
-export function renderHomeAdHtml(): string {
- return ``;
-}
diff --git a/apps/logicsrc-web/src/lib/page-markup.ts b/apps/logicsrc-web/src/lib/page-markup.ts
index d06258f0..583a1d77 100644
--- a/apps/logicsrc-web/src/lib/page-markup.ts
+++ b/apps/logicsrc-web/src/lib/page-markup.ts
@@ -7,7 +7,6 @@ import { renderInstallCommand } from "./install-command";
import { renderNavHtml } from "./nav";
import { renderCrumbsHtml } from "./crumbs";
import { FAMILIES, familyTree } from "./specs";
-import { renderHomeAdHtml } from "./ad-network";
const schemas = [
{ name: "logicsrc-task", path: "packages/schemas/schemas/logicsrc-task.schema.json" },
@@ -149,7 +148,6 @@ export function renderPageMarkup(path = "/", footer = ""): string {
3reference plugins
- ${path === "/" ? renderHomeAdHtml() : ""}
diff --git a/apps/logicsrc-web/src/styles.css b/apps/logicsrc-web/src/styles.css
index 48eb7803..f1f76c99 100644
--- a/apps/logicsrc-web/src/styles.css
+++ b/apps/logicsrc-web/src/styles.css
@@ -1004,16 +1004,3 @@ pre {
color: #101418;
font-weight: 600;
}
-
-/* Home page ad.network unit: collapsed until crawlproof's ad.js fills it. */
-.home-ad {
- display: flex;
- justify-content: center;
- height: 0;
- overflow: hidden;
-}
-.home-ad[data-cp-filled] {
- height: auto;
- min-height: 266px;
- margin: 8px 0 24px;
-}