diff --git a/next.config.mjs b/next.config.mjs index c3bec89..15eff7c 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,6 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - + output: 'export' }; export default nextConfig; diff --git a/src/app/[lang]/home/page.tsx b/src/app/[lang]/home/page.tsx index dac298f..cd7524c 100644 --- a/src/app/[lang]/home/page.tsx +++ b/src/app/[lang]/home/page.tsx @@ -1,3 +1,11 @@ +export async function generateStaticParams() { + return ['en', 'zh'].map((post) => ({ + lang: post, + })) +} + + + import Image from "next/image"; import { getDictionary } from '@/dictionaries'; import Form from "./components/form"; @@ -12,6 +20,9 @@ export type PropsType = { lang: string; }; } + + + export default async function Home (props: PropsType) { const lang = props.params.lang; const dict = await getDictionary(lang);