返回 CodeWhale
page.tsx
根目录 / web / app / [locale] / docs / page.tsx
1 import { DocsSearch } from "@/components/docs-search";
2 import { getDocsShell } from "@/lib/i18n/dictionaries";
3 import { buildPageMetadata } from "@/lib/page-meta";
4
5 export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }) {
6 const { locale } = await params;
7 const t = getDocsShell(locale);
8 return buildPageMetadata({
9 path: "/docs",
10 locale,
11 title: t.metaTitle,
12 description: t.metaDescription,
13 });
14 }
15
16 export default async function DocsHubPage({ params }: { params: Promise<{ locale: string }> }) {
17 const { locale } = await params;
18 const t = getDocsShell(locale);
19 return (
20 <>
21 <h1>{t.heroTitle}</h1>
22 <p className="docs-hub-lede">{t.heroLead}</p>
23 <DocsSearch locale={locale} />
24 </>
25 );
26 }
27
27 lines Plain Text