- Replace VitePress with Fumadocs + Next.js for documentation site - Configure i18n (English + 简体中文) with language switcher - Migrate all 17 guide documents to MDX format with updated content - Add ocean theme, GitHub/Discord/QQ social links - Update GitHub Actions workflow for Next.js static export - Update .gitignore for .next, out, .source directories
28 lines
633 B
TypeScript
28 lines
633 B
TypeScript
import type { ReactNode } from 'react';
|
|
import { RootProvider } from 'fumadocs-ui/provider/next';
|
|
import { i18nUI } from '@/lib/i18n';
|
|
|
|
export default async function LangLayout({
|
|
params,
|
|
children,
|
|
}: {
|
|
params: Promise<{ lang: string }>;
|
|
children: ReactNode;
|
|
}) {
|
|
const { lang } = await params;
|
|
|
|
return (
|
|
<html lang={lang} suppressHydrationWarning>
|
|
<body className="flex min-h-screen flex-col">
|
|
<RootProvider i18n={i18nUI.provider(lang)}>
|
|
{children}
|
|
</RootProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|
|
|
|
export function generateStaticParams() {
|
|
return [{ lang: 'en' }, { lang: 'cn' }];
|
|
}
|