From 51257e004f3bf8e1d0e1a101ca8529b01a7833fd Mon Sep 17 00:00:00 2001 From: yusufipk Date: Sun, 14 Jun 2026 16:36:26 +0200 Subject: [PATCH] Add SEO comparison landing pages and footer compare links. Introduces dynamic marketing comparison routes, competitor data, and Compare sections on the homepage and marketing footer. --- app/(marketing)/[slug]/page.tsx | 58 ++ app/sitemap.ts | 25 + components/LandingPage.tsx | 57 +- components/marketing/comparison-page.tsx | 224 ++++++ .../marketing/feature-comparison-table.tsx | 68 ++ .../marketing/marketing-compare-links.tsx | 23 + components/marketing/marketing-footer.tsx | 48 ++ components/marketing/marketing-header.tsx | 77 ++ components/marketing/pricing-comparison.tsx | 34 + components/marketing/product-visual.tsx | 175 +++++ lib/marketing/comparison-pages.ts | 716 ++++++++++++++++++ lib/marketing/comparison-sources.ts | 571 ++++++++++++++ lib/marketing/comparison-types.ts | 91 +++ lib/marketing/metadata.ts | 106 +++ 14 files changed, 2248 insertions(+), 25 deletions(-) create mode 100644 app/(marketing)/[slug]/page.tsx create mode 100644 components/marketing/comparison-page.tsx create mode 100644 components/marketing/feature-comparison-table.tsx create mode 100644 components/marketing/marketing-compare-links.tsx create mode 100644 components/marketing/marketing-footer.tsx create mode 100644 components/marketing/marketing-header.tsx create mode 100644 components/marketing/pricing-comparison.tsx create mode 100644 components/marketing/product-visual.tsx create mode 100644 lib/marketing/comparison-pages.ts create mode 100644 lib/marketing/comparison-sources.ts create mode 100644 lib/marketing/comparison-types.ts create mode 100644 lib/marketing/metadata.ts diff --git a/app/(marketing)/[slug]/page.tsx b/app/(marketing)/[slug]/page.tsx new file mode 100644 index 0000000..d62d136 --- /dev/null +++ b/app/(marketing)/[slug]/page.tsx @@ -0,0 +1,58 @@ +import type { Metadata } from 'next'; +import { notFound } from 'next/navigation'; +import { ComparisonPage } from '@/components/marketing/comparison-page'; +import { auth } from '@/lib/auth'; +import { comparisonPages, getComparisonPage } from '@/lib/marketing/comparison-pages'; +import { buildComparisonJsonLd, buildComparisonMetadata } from '@/lib/marketing/metadata'; + +interface MarketingSlugPageProps { + params: Promise<{ slug: string }>; +} + +export function generateStaticParams() { + return comparisonPages.map((page) => ({ slug: page.slug })); +} + +export async function generateMetadata({ params }: MarketingSlugPageProps): Promise { + const { slug } = await params; + const page = getComparisonPage(slug); + + if (!page) { + return {}; + } + + return buildComparisonMetadata({ + title: page.title, + description: page.metaDescription, + path: `/${page.slug}`, + keywords: page.keywords, + }); +} + +export default async function MarketingSlugPage({ params }: MarketingSlugPageProps) { + const { slug } = await params; + const page = getComparisonPage(slug); + + if (!page) { + notFound(); + } + + const session = await auth(); + const structuredData = buildComparisonJsonLd({ + title: page.title, + description: page.metaDescription, + path: `/${page.slug}`, + faq: page.faq, + }); + const safeStructuredData = JSON.stringify(structuredData).replace(/ +