/** * /search?q=...&type=...&doc_id=... — bookmarkable hybrid search. * * Magazine-style page: same global SiteHeader as the rest of the site, an * editorial hero that says in plain language what this page is, and a * SearchPanel below. No tech jargon ("BM25", "BGE-M3", "rerank") visible to * the reader — that detail is for engineers, not enthusiasts. */ import type { Metadata } from "next"; import { SearchPanel } from "@/components/search-panel"; import { SiteHeader } from "@/components/site-header"; import { getLocale } from "@/components/locale-toggle"; export const runtime = "nodejs"; export const dynamic = "force-dynamic"; const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? "https://disclosure.top"; export async function generateMetadata(): Promise { const locale = await getLocale(); const title = locale === "en" ? "Search the archive" : "Buscar no arquivo"; const desc = locale === "en" ? "Search 28,000+ passages from declassified UAP/UFO documents. Verbatim quotes, page-level citations, bbox crops." : "Busque em mais de 28 mil passagens dos documentos UAP/UFO desclassificados. Citações verbatim, referências por página, recortes em bbox."; return { title, description: desc, alternates: { canonical: `${SITE_URL}/search` }, openGraph: { title, description: desc, url: `${SITE_URL}/search` }, }; } export default async function SearchPage({ searchParams, }: { searchParams: Promise<{ q?: string; lang?: string; type?: string; doc_id?: string }>; }) { const sp = await searchParams; const locale = (await getLocale()) === "en" ? "en" : "pt-br"; const lang: "pt" | "en" = (sp.lang as "pt" | "en") ?? (locale === "en" ? "en" : "pt"); const heroEyebrow = locale === "en" ? "Search the archive" : "Buscar no arquivo"; const heroTitle = locale === "en" ? "Find a passage, a witness, a date." : "Encontre uma passagem, uma testemunha, uma data."; const heroLead = locale === "en" ? "Search across every declassified page in the bureau. Results link straight to the source — page, chunk, and the original bounding box around the passage." : "Busque em todas as páginas desclassificadas do bureau. Cada resultado leva direto à fonte — página, trecho e o recorte original ao redor da passagem."; return (
{heroEyebrow}

{heroTitle}

{heroLead}

); }