新增 /contact 联系我们页面
- types/wagtail.ts 新增 ContactPageDetail(与 HomePageDetail 同构)。 - services/page.service.ts 新增 getContactPage()。 - services/preview.service.ts 的 PREVIEW_PATH_RESOLVERS 新增 core.contactpage -> /contact。 - 新建 app/contact/page.tsx(generateMetadata + getPreviewOrFallback + BlockRenderer,与首页同构,未配置内容时展示友好提示而非 404)。
This commit is contained in:
@@ -231,6 +231,12 @@ export interface SimpleContentPageDetail extends WagtailPageSummary {
|
||||
body: string; // richtext HTML
|
||||
}
|
||||
|
||||
export interface ContactPageDetail extends WagtailPageSummary {
|
||||
body: StreamFieldBlock[];
|
||||
seo_title_override?: string;
|
||||
seo_description_override?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 全局 Snippet 类型(apps/core/models.py)。
|
||||
* 通过 /api/v1/custom/core/... 只读接口获取,非 Wagtail Page API。
|
||||
|
||||
Reference in New Issue
Block a user