feat: 更新网站配置和内容,优化国际化设置

refactor: 重构产线页面和路由,移除无用代码
style: 调整内容格式和样式,统一中英文标点
docs: 更新产品描述和元数据,完善多语言支持
This commit is contained in:
砂糖
2026-01-26 16:22:07 +08:00
parent 8e4f76f9e0
commit 99ce2b7fb8
20 changed files with 100 additions and 369 deletions

View File

@@ -130,16 +130,16 @@ export default async function ProductDetailPage({ params }: { params: Params })
export async function generateStaticParams() {
try {
const defaultLocale = LOCALES[0];
const workShops: Line[] = await getLines(defaultLocale);
const lines: Line[] = await getLines(defaultLocale);
return LOCALES.flatMap((locale) =>
workShops.map((workShop) => ({
lines.map((line) => ({
locale,
slug: workShop.slug as string,
slug: line.slug as string,
}))
);
} catch (error) {
console.error("生成产静态参数失败:", error);
console.error("生成产线静态参数失败:", error);
return [];
}
}

View File

@@ -19,7 +19,7 @@ type MetadataProps = {
export async function generateMetadata({
params,
}: MetadataProps): Promise<Metadata> {
const { locale } = params;
const { locale } = await params;
const t = await getTranslations({ locale, namespace: "Workshop" });
return constructMetadata({