feat: new blog layout and props

This commit is contained in:
KazooTTT
2025-02-05 15:27:29 +08:00
parent ea645368e9
commit fea129eb98
12 changed files with 36 additions and 50 deletions

View File

@ -12,7 +12,13 @@ interface Props {
}
const { post } = Astro.props;
const { ogImage, title, description, updatedDate, publishDate } = post.data;
const {
banner: ogImage,
title,
description,
date_modified: updatedDate,
date: publishDate,
} = post.data;
const socialImage = ogImage ?? `/og-image/${post.id}.png`;
const articleDate = updatedDate?.toISOString() ?? publishDate.toISOString();
const { headings, remarkPluginFrontmatter } = await render(post);