feat: render CMS content fields and footer settings

This commit is contained in:
2026-10-11 19:44:54 +08:00
parent 870b9b4282
commit f990df3023
19 changed files with 250 additions and 38 deletions
+5 -1
View File
@@ -3,6 +3,7 @@ import type { Metadata } from "next";
import { getBlogList } from "@/services/blog.service";
import { createPageMetadata, getPageSEO } from "@/services/seo.service";
import PageSEO from "@/components/layout/PageSEO";
import { BlogTags, ColumnHeading, PageCover, PublicationDate } from "@/components/layout/PageContent";
export async function generateMetadata(): Promise<Metadata> {
return createPageMetadata(await getPageSEO("blog.BlogIndexPage", "blog").catch(() => null), "技术博客");
@@ -14,7 +15,7 @@ export default async function BlogListPage() {
return (
<div className="mx-auto max-w-4xl px-6 py-24">
<PageSEO type="blog.BlogIndexPage" slug="blog" />
<h1 className="mb-12 text-4xl font-bold text-slate-900">技术博客</h1>
<ColumnHeading type="blog.BlogIndexPage" slug="blog" fallback="技术博客" />
<ul className="space-y-6">
{posts.map((post) => (
<li key={post.id} className="border-b border-slate-100 pb-6">
@@ -24,7 +25,10 @@ export default async function BlogListPage() {
>
{post.title}
</Link>
<PageCover image={post.cover_image} compact />
<PublicationDate value={post.published_at} />
{post.intro && <p className="mt-2 text-slate-600">{post.intro}</p>}
<BlogTags tags={post.tags} />
</li>
))}
{posts.length === 0 && (