diff --git a/src/app/technology/page.tsx b/src/app/technology/page.tsx index cefb8e9..f830187 100644 --- a/src/app/technology/page.tsx +++ b/src/app/technology/page.tsx @@ -10,22 +10,71 @@ import { getLegacyArticlesBySection } from "@/lib/articles/legacy-source"; export const revalidate = 1800; -export const metadata: Metadata = { - title: "Production Technology Deep Dives — Broadcast Beat", - description: - "Deep-dive analysis of broadcast technology trends: IP workflows, cloud production, AI automation, streaming infrastructure, and ATSC 3.0.", - alternates: { canonical: "/technology" }, - openGraph: { - title: "Production Technology Deep Dives — Broadcast Beat", - description: - "Deep-dive analysis of broadcast technology trends: IP workflows, cloud production, AI automation, streaming infrastructure, and ATSC 3.0.", - url: "/technology", - type: "website", +// 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.", }, }; -export default async function TechnologyPage() { - const articles = await getLegacyArticlesBySection("technology"); +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} — Broadcast Beat` : "Production Technology Deep Dives — Broadcast 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 (
@@ -36,13 +85,59 @@ export default async function TechnologyPage() {
Technology
+ {filter && ( + + clear filter + + )} +
+

{h1}

+

{subtitle}

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

Production Technology

-

Deep-dive coverage of IP infrastructure, AI, cloud production, and the standards shaping broadcast's future

+ {articles.length === 0 && ( +
+

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

+ {filter && ( + + ← Back to all technology coverage + + )} +
+ )} + {/* Featured technology article */} {articles[0] && (