This commit is contained in:
hailin 2025-03-25 15:02:33 +08:00
parent 662f3816b0
commit 981e3d1eae
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ export interface ArticleData {
id: number; id: number;
org_id: number; org_id: number;
spider_id: number; spider_id: number;
pname: string; p_name: string;
tag: string; tag: string;
category: string; category: string;
main_title: string; main_title: string;

View File

@ -281,7 +281,7 @@ export const getPostContent = async (language: string, slug: string): Promise<AI
// Serialize the MDX content and parse the frontmatter // Serialize the MDX content and parse the frontmatter
const serialized = await mdxSerialized({ rawMdx }); const serialized = await mdxSerialized({ rawMdx });
const frontmatter = serialized.frontmatter as AIFrontmatter; const frontmatter = serialized.frontmatter as AIFrontmatter;
frontmatter.p_name = data.pname frontmatter.p_name = data.p_name
frontmatter.title = data.main_title frontmatter.title = data.main_title
frontmatter.description = data.sub_title || data.main_title frontmatter.description = data.sub_title || data.main_title
frontmatter.date = data.updated_time frontmatter.date = data.updated_time