import React from "react"; import type { Metadata } from "next"; import Link from "next/link"; import Header from "@/components/Header"; import Footer from "@/components/Footer"; import AppImage from "@/components/ui/AppImage"; import AdImage from "@/components/AdImage"; import { pickAds } from "@/lib/ads"; import { getLegacyArticlesBySection } from "@/lib/articles/legacy-source"; import SidebarAdStack from "@/components/SidebarAdStack"; export const revalidate = 1800; // Category sub-filters keyed off the ?category= query string. Each one // pairs a display title with the keywords used to match an article's // category, tags, or title (substring, case-insensitive). const CATEGORY_FILTERS: Record = { ai: { title: "AI & Automation", keywords: ["ai", "artificial intelligence", "automation", "machine learning", "ml"], description: "Coverage of AI and automation in broadcast — generative tools, ML-driven workflows, automated playout, and editorial-grade AI.", }, cloud: { title: "Cloud Production", keywords: ["cloud"], description: "Cloud-native production, remote workflows, hybrid pipelines, and SaaS-delivered broadcast infrastructure.", }, "ip-workflows": { title: "IP Workflows", keywords: ["ip", "st 2110", "smpte 2110", "nmos"], description: "ST 2110, NMOS, IP infrastructure, and the migration off SDI.", }, streaming: { title: "Streaming", keywords: ["streaming", "ott", "fast", "vod"], description: "OTT, FAST, VOD, low-latency streaming, and direct-to-consumer delivery.", }, "atsc-3": { title: "ATSC 3.0 / NextGen TV", keywords: ["atsc", "nextgen"], description: "ATSC 3.0 deployments, 5G Broadcast, datacasting, and the U.S. terrestrial transition.", }, }; interface PageProps { searchParams?: Promise<{ category?: string }>; } export async function generateMetadata({ searchParams }: PageProps): Promise { const sp = await searchParams; const cat = sp?.category && CATEGORY_FILTERS[sp.category]; const title = cat ? `${cat.title} — AV Beat` : "Production Technology Deep Dives — AV Beat"; const desc = cat?.description || "Deep-dive analysis of broadcast technology trends: IP workflows, cloud production, AI automation, streaming infrastructure, and ATSC 3.0."; return { title, description: desc, alternates: { canonical: sp?.category ? `/technology?category=${sp.category}` : "/technology" }, openGraph: { title, description: desc, url: "/technology", type: "website" }, }; } function articleMatches(a: { title?: string | null; category?: string | null; tags?: string[] | null }, keywords: string[]): boolean { const hay = `${a.title || ""} ${a.category || ""} ${(a.tags || []).join(" ")}`.toLowerCase(); return keywords.some((k) => hay.includes(k.toLowerCase())); } export default async function TechnologyPage({ searchParams }: PageProps) { const sp = await searchParams; const filterSlug = sp?.category && CATEGORY_FILTERS[sp.category] ? sp.category : null; const filter = filterSlug ? CATEGORY_FILTERS[filterSlug] : null; const baseArticles = await getLegacyArticlesBySection("technology"); const articles = filter ? baseArticles.filter((a) => articleMatches(a, filter.keywords)) : baseArticles; const h1 = filter ? filter.title : "Production Technology"; const subtitle = filter ? filter.description : "Deep-dive coverage of IP infrastructure, AI, cloud production, and the standards shaping broadcast's future"; return (
{/* DO NOT OVERRIDE — Technology page hero header */}
Technology
{filter && ( clear filter )}

{h1}

{subtitle}

{/* Sub-category chips */}
All {Object.entries(CATEGORY_FILTERS).map(([slug, def]) => { const isActive = filterSlug === slug; return ( {def.title} ); })}
{articles.length === 0 && (

No articles found{filter ? ` for "${filter.title}"` : ""}.

{filter && ( ← Back to all technology coverage )}
)} {/* Featured technology article */} {articles[0] && (
{articles[0].category} · {articles[0].date} · {articles[0].readTime}

{articles[0].title}

{articles[0].excerpt}

{articles[0].tags.map((tag) => ( {tag} ))}
)} {/* Technology article grid */}
{articles.slice(1).map((article) => (
{article.category} · {article.readTime}

{article.title}

{article.category !== "Featured" && ( {article.date} )}
))}
{/* In-content 728x90 banner */} {pickAds("728x90", 1).length > 0 && (
)}
); }