This commit is contained in:
parent
22b4f1855e
commit
812b9da818
|
|
@ -89,7 +89,7 @@ const BlogArticleWrapper = async ({ params }: { params: { slug: string, locale:
|
|||
<DetailPageHeader
|
||||
data={{
|
||||
icon: "🚀",
|
||||
name: frontmatter.title,
|
||||
name: frontmatter.p_name,
|
||||
category: frontmatter.tags,
|
||||
updated_at: frontmatter.date,
|
||||
company: frontmatter.title,
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ export interface ArticleData {
|
|||
id: number;
|
||||
org_id: number;
|
||||
spider_id: number;
|
||||
pname: string;
|
||||
tag: string;
|
||||
category: string;
|
||||
main_title: string;
|
||||
|
|
@ -50,6 +51,7 @@ export interface ArticleData {
|
|||
tags: string[];
|
||||
url: string;
|
||||
image_url: string;
|
||||
logo_url: string;
|
||||
content: string;
|
||||
is_hotspot: boolean;
|
||||
is_overwritten: boolean;
|
||||
|
|
|
|||
|
|
@ -107,11 +107,13 @@ type Frontmatter = {
|
|||
};
|
||||
|
||||
type AIFrontmatter = {
|
||||
p_name:string;
|
||||
title: string;
|
||||
date: string;
|
||||
description: string;
|
||||
author: string;
|
||||
image_url: string;
|
||||
logo_url: string;
|
||||
visible: boolean | undefined;
|
||||
salary: string | undefined;
|
||||
level: string | undefined;
|
||||
|
|
@ -279,11 +281,13 @@ export const getPostContent = async (language: string, slug: string): Promise<AI
|
|||
// Serialize the MDX content and parse the frontmatter
|
||||
const serialized = await mdxSerialized({ rawMdx });
|
||||
const frontmatter = serialized.frontmatter as AIFrontmatter;
|
||||
frontmatter.p_name = data.pname
|
||||
frontmatter.title = data.main_title
|
||||
frontmatter.description = data.sub_title || data.main_title
|
||||
frontmatter.date = data.updated_time
|
||||
frontmatter.tags = data.tags
|
||||
frontmatter.image_url = data.image_url
|
||||
frontmatter.logo_url = data.logo_url
|
||||
// const headings = data.main_title;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue