From fe92f303d420cf3dfc49ae3834158d4fac8fd9e5 Mon Sep 17 00:00:00 2001 From: Sat Naing Date: Wed, 21 Sep 2022 14:08:47 +0630 Subject: [PATCH] Update PostDetails layout to accept author, desc and og image --- src/layouts/PostDetails.astro | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/layouts/PostDetails.astro b/src/layouts/PostDetails.astro index b50bed6..604dae8 100644 --- a/src/layouts/PostDetails.astro +++ b/src/layouts/PostDetails.astro @@ -11,10 +11,17 @@ export interface Props { post: MarkdownInstance; } -const { post } = Astro.props; +const { frontmatter, Content } = Astro.props.post; + +const { title, author, description, ogImage, datetime, tags } = frontmatter; --- - +
-

{post.frontmatter.title}

- +

{title}

+
- +
    - {post.frontmatter.tags.map((tag) => )} + {tags.map((tag) => )}