diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index f891f461..19b06fd2 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -1,4 +1,4 @@ -import type { Metadata } from 'next'; +import type { Metadata, ResolvingMetadata } from 'next'; import { getTranslations } from 'next-intl/server'; import { headers } from 'next/headers'; import Link from 'next/link'; @@ -18,11 +18,28 @@ import { Header } from '@/components/header'; import { Footer } from '@/components/footer'; import { RotatingText } from '@/components/RotatingText'; -export const metadata: Metadata = { - alternates: { - canonical: 'https://pairux.com', - }, -}; +// ad.network publisher claim for pairux.com. The meta tag lets ad.network +// verify ownership from the server-rendered HTML. The home page unit is a plain +// iframe to crawlproof's ad frame (not ad.js): the per-request CSP in +// middleware.ts has no frame-src for srcdoc frames to inherit, so it allows +// https://crawlproof.com in frame-src instead. +const AD_NETWORK_CODE = 'dYMbKXer6PUc3meh'; +const HOME_AD_SLOT = 'f90b82f7-5e16-4419-b7b5-81723ca35c66'; + +// generateMetadata so the root layout's `other` tags (msapplication-*) are +// kept: a static `other` here would replace them rather than merge. +export async function generateMetadata( + _props: unknown, + parent: ResolvingMetadata +): Promise { + const { other } = await parent; + return { + alternates: { + canonical: 'https://pairux.com', + }, + other: { ...other, 'ad.network': AD_NETWORK_CODE }, + }; +} const softwareApplicationSchema = { '@context': 'https://schema.org', @@ -126,6 +143,24 @@ export default async function HomePage() {
+ {/* ad.network home page unit */} +