diff --git a/web/app/layout.tsx b/web/app/layout.tsx
index f8888e1..80086ae 100644
--- a/web/app/layout.tsx
+++ b/web/app/layout.tsx
@@ -2,7 +2,7 @@ import type { Metadata } from "next";
import { JetBrains_Mono, Inter, Fraunces } from "next/font/google";
import "./globals.css";
import { CommandPalette } from "@/components/command-palette";
-import { LocaleToggle, getLocale } from "@/components/locale-toggle";
+import { getLocale } from "@/components/locale-toggle";
const inter = Inter({ subsets: ["latin"], variable: "--font-sans" });
const mono = JetBrains_Mono({ subsets: ["latin"], variable: "--font-mono" });
@@ -16,67 +16,90 @@ const fraunces = Fraunces({
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? "https://disclosure.top";
-export const metadata: Metadata = {
- metadataBase: new URL(SITE_URL),
- title: {
- default: "The Disclosure Bureau — UAP/UFO desclassificado",
- template: "%s · The Disclosure Bureau",
- },
- description:
- "122 documentos desclassificados do Departamento de Guerra dos EUA sobre UAP/UFO. " +
- "Pilotos, oficiais e físicos relatam o que viram. Avistamentos, testemunhas, " +
- "objetos catalogados — arquivos abertos da divulgação.",
- keywords: [
- "UAP", "UFO", "ovni", "desclassificado", "war.gov", "Pentagon",
- "Kenneth Arnold", "Mantell", "green fireballs", "Sandia",
- "Project Blue Book", "Robertson Panel", "AATIP",
- "documentos desclassificados", "avistamento", "testemunha",
- "disclosure", "divulgação UFO",
- ],
- authors: [{ name: "The Disclosure Bureau" }],
- openGraph: {
- type: "website",
- siteName: "The Disclosure Bureau",
- title: "The Disclosure Bureau — UAP/UFO desclassificado",
- description:
- "122 documentos desclassificados. Pilotos, oficiais, físicos relatam o que viram.",
- locale: "pt_BR",
- alternateLocale: ["en_US"],
- url: SITE_URL,
- images: [{
- url: `${SITE_URL}/api/static/processing/case-art/green-fireballs-narrative.png`,
- width: 2000, height: 1125,
- alt: "The Disclosure Bureau — UAP/UFO desclassificado",
- }],
- },
- twitter: {
- card: "summary_large_image",
- title: "The Disclosure Bureau",
- description: "Arquivos UAP/UFO desclassificados, narrados a partir do registro público.",
- images: [`${SITE_URL}/api/static/processing/case-art/green-fireballs-narrative.png`],
- },
- alternates: {
- canonical: "/",
- languages: { "pt-BR": "/", "en-US": "/" },
- },
- robots: {
- index: true,
- follow: true,
- googleBot: {
+// Site-wide metadata is locale-aware: title, description, OG, twitter, html
+// lang and openGraph.locale must all switch when the cookie toggles. Static
+// `export const metadata` is resolved without cookies, so the title would
+// stay pinned to whichever language built the page. generateMetadata() runs
+// per request and can read the cookie via getLocale().
+export async function generateMetadata(): Promise
{
+ const locale = await getLocale();
+ const t = locale === "en"
+ ? {
+ title: "The Disclosure Bureau — declassified UAP/UFO",
+ template: "%s · The Disclosure Bureau",
+ desc: "122 declassified US Department of War documents on UAP/UFO. " +
+ "Pilots, officers and physicists describe what they saw. Sightings, " +
+ "witnesses, catalogued craft — the open files of disclosure.",
+ og_desc: "122 declassified documents. Pilots, officers, physicists describe what they saw.",
+ tw_desc: "Declassified UAP/UFO files, narrated from the public record.",
+ ogLocale: "en_US",
+ altLocale: "pt_BR",
+ }
+ : {
+ title: "The Disclosure Bureau — UAP/UFO desclassificado",
+ template: "%s · The Disclosure Bureau",
+ desc: "122 documentos desclassificados do Departamento de Guerra dos EUA sobre UAP/UFO. " +
+ "Pilotos, oficiais e físicos relatam o que viram. Avistamentos, testemunhas, " +
+ "objetos catalogados — arquivos abertos da divulgação.",
+ og_desc: "122 documentos desclassificados. Pilotos, oficiais, físicos relatam o que viram.",
+ tw_desc: "Arquivos UAP/UFO desclassificados, narrados a partir do registro público.",
+ ogLocale: "pt_BR",
+ altLocale: "en_US",
+ };
+
+ return {
+ metadataBase: new URL(SITE_URL),
+ title: { default: t.title, template: t.template },
+ description: t.desc,
+ keywords: [
+ "UAP", "UFO", "ovni", "desclassificado", "war.gov", "Pentagon",
+ "Kenneth Arnold", "Mantell", "green fireballs", "Sandia",
+ "Project Blue Book", "Robertson Panel", "AATIP",
+ "documentos desclassificados", "avistamento", "testemunha",
+ "disclosure", "divulgação UFO",
+ ],
+ authors: [{ name: "The Disclosure Bureau" }],
+ openGraph: {
+ type: "website",
+ siteName: "The Disclosure Bureau",
+ title: t.title,
+ description: t.og_desc,
+ locale: t.ogLocale,
+ alternateLocale: [t.altLocale],
+ url: SITE_URL,
+ images: [{
+ url: `${SITE_URL}/api/static/processing/case-art/green-fireballs-narrative.png`,
+ width: 2000, height: 1125,
+ alt: t.title,
+ }],
+ },
+ twitter: {
+ card: "summary_large_image",
+ title: "The Disclosure Bureau",
+ description: t.tw_desc,
+ images: [`${SITE_URL}/api/static/processing/case-art/green-fireballs-narrative.png`],
+ },
+ alternates: {
+ canonical: "/",
+ languages: { "pt-BR": "/", "en-US": "/" },
+ },
+ robots: {
index: true,
follow: true,
- "max-image-preview": "large",
- "max-snippet": -1,
+ googleBot: {
+ index: true,
+ follow: true,
+ "max-image-preview": "large",
+ "max-snippet": -1,
+ },
},
- },
- other: {
- // GEO (Generative Engine Optimization) — explicit primary-source statement
- // so retrieval-augmented assistants understand what the site is.
- "ai:purpose":
- "Public, citation-linked archive of declassified UAP/UFO documents from the US Department of War. Each case file is grounded in primary-source memos with verbatim quotes and bbox-cropped imagery.",
- "ai:license": "Documents are US Government works in the public domain; site narrative © Disclosure Bureau, CC-BY 4.0.",
- },
-};
+ other: {
+ "ai:purpose":
+ "Public, citation-linked archive of declassified UAP/UFO documents from the US Department of War. Each case file is grounded in primary-source memos with verbatim quotes and bbox-cropped imagery.",
+ "ai:license": "Documents are US Government works in the public domain; site narrative © Disclosure Bureau, CC-BY 4.0.",
+ },
+ };
+}
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const locale = await getLocale();
@@ -105,9 +128,6 @@ export default async function RootLayout({ children }: { children: React.ReactNo
{children}
-
-
-