feat: 配置静态打包

style
icefire 2024-10-16 15:19:24 +08:00
parent 10df24f969
commit 77362e3d6b
2 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export'
};
export default nextConfig;

View File

@ -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);