feat: 配置静态打包
parent
10df24f969
commit
77362e3d6b
|
@ -1,6 +1,6 @@
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
|
output: 'export'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
export async function generateStaticParams() {
|
||||||
|
return ['en', 'zh'].map((post) => ({
|
||||||
|
lang: post,
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { getDictionary } from '@/dictionaries';
|
import { getDictionary } from '@/dictionaries';
|
||||||
import Form from "./components/form";
|
import Form from "./components/form";
|
||||||
|
@ -12,6 +20,9 @@ export type PropsType = {
|
||||||
lang: string;
|
lang: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default async function Home (props: PropsType) {
|
export default async function Home (props: PropsType) {
|
||||||
const lang = props.params.lang;
|
const lang = props.params.lang;
|
||||||
const dict = await getDictionary(lang);
|
const dict = await getDictionary(lang);
|
||||||
|
|
Loading…
Reference in New Issue