diff --git a/data/blog/new-post-with-banner.mdx b/data/blog/new-post-with-banner.mdx new file mode 100644 index 0000000..05c0d4d --- /dev/null +++ b/data/blog/new-post-with-banner.mdx @@ -0,0 +1,33 @@ +--- +title: 'My New Blog Post with Banner' +date: '2023-04-15' +lastmod: '2023-04-15' +tags: ['blog', 'feature'] +draft: false +summary: 'This is a sample blog post demonstrating the use of a banner image in the frontmatter.' +images: ['/static/images/powdr-banner.png'] +layout: PostBanner +--- + +# Welcome to My New Blog Post + +This is a sample blog post that demonstrates the use of a banner image and the PostBanner layout. The banner image is specified in the frontmatter of this Markdown file. + +## What's Different? + +In the frontmatter of this post, we've added two important elements: + +1. `images: ['/static/images/sample-banner.jpg']` - This specifies the banner image to be used. +2. `layout: PostBanner` - This tells the blog to use the PostBanner layout for this post. + +## Rest of the Post + +The rest of your post content goes here. You can use all the Markdown features as usual, such as: + +- Lists +- **Bold text** +- *Italic text* +- [Links](https://example.com) +- And more! + +Remember to actually add the image file `sample-banner.jpg` to your `/static/images/` directory for this to work properly. diff --git a/layouts/PostBanner.tsx b/layouts/PostBanner.tsx index 67a117d..27a9d7e 100644 --- a/layouts/PostBanner.tsx +++ b/layouts/PostBanner.tsx @@ -29,11 +29,9 @@ export default function PostMinimal({ content, next, prev, children }: LayoutPro