mirror of
https://github.com/10h30/jpadventure.git
synced 2026-05-12 15:21:19 +09:00
Add MarkdownPostLayout component and update post files to use it for consistent layout
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
---
|
||||
import BaseLayout from "./BaseLayout.astro";
|
||||
const { frontmatter } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout pageTitle={frontmatter.title}>
|
||||
<p>Published on: {frontmatter.pubDate.toString().slice(0, 10)}</p>
|
||||
<p>Written by {frontmatter.author}</p>
|
||||
<img src={frontmatter.image.url} width='300' alt={frontmatter.image.alt} />
|
||||
<slot />
|
||||
</BaseLayout>
|
||||
<meta charset='utf-8' />
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
layout: ../../layouts/MarkdownPostLayout.astro
|
||||
title: 'My First Blog Post'
|
||||
pubDate: 2022-07-01
|
||||
description: 'This is the first post of my new Astro blog.'
|
||||
@@ -8,10 +9,6 @@ image:
|
||||
alt: 'The Astro logo on a dark background with a pink glow.'
|
||||
tags: ["astro", "blogging", "learning in public"]
|
||||
---
|
||||
# My First Blog Post
|
||||
|
||||
Published on: 2022-07-01
|
||||
|
||||
Welcome to my _new blog_ about learning Astro! Here, I will share my learning journey as I build a new website.
|
||||
|
||||
## What I've accomplished
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
layout: ../../layouts/MarkdownPostLayout.astro
|
||||
title: My Second Blog Post
|
||||
author: Astro Learner
|
||||
description: "After learning some Astro, I couldn't stop!"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
layout: ../../layouts/MarkdownPostLayout.astro
|
||||
title: My Third Blog Post
|
||||
author: Astro Learner
|
||||
description: "I had some challenges, but asking in the community really helped!"
|
||||
|
||||
Reference in New Issue
Block a user