feat: render CMS SEO metadata and refresh published page caches

This commit is contained in:
2026-10-11 18:05:47 +08:00
parent a8e2863cc4
commit 870b9b4282
19 changed files with 310 additions and 35 deletions
+6 -3
View File
@@ -1,16 +1,19 @@
import Link from "next/link";
import type { Metadata } from "next";
import { getProductList } from "@/services/product.service";
import { createPageMetadata, getPageSEO } from "@/services/seo.service";
import PageSEO from "@/components/layout/PageSEO";
export const metadata: Metadata = {
title: "产品",
};
export async function generateMetadata(): Promise<Metadata> {
return createPageMetadata(await getPageSEO("products.ProductIndexPage", "products").catch(() => null), "产品");
}
export default async function ProductListPage() {
const products = await getProductList().catch(() => []);
return (
<div className="mx-auto max-w-4xl px-6 py-24">
<PageSEO type="products.ProductIndexPage" slug="products" />
<h1 className="mb-12 text-4xl font-bold text-slate-900">产品</h1>
<ul className="space-y-6">
{products.map((product) => (