refactor: blog layout

This commit is contained in:
Ruidy 2024-12-31 13:34:29 +01:00
parent 72dd16d023
commit 10869f1e64
No known key found for this signature in database
GPG key ID: E00F51288CB857CC

View file

@ -1,7 +1,11 @@
---
import BaseLayout from "./BaseLayout.astro"
const { frontmatter } = Astro.props
---
<h1>{frontmatter.title}</h1>
<p>Published on: {frontmatter.pubDate.toString()}</p>
<p>written by {frontmatter.author}</p>
<slot/>
<BaseLayout pageTitle={frontmatter.title}>
<p>Published on: {frontmatter.pubDate.toString().slice(0, 10)}</p>
<p><em>{frontmatter.description}</em></p>
<p>Written by: {frontmatter.author}</p>
<img src={frontmatter.image.url} alt={frontmatter.image.alt} width="500"/>
<slot/>
</BaseLayout>