Skip to content

Commit

Permalink
Forward metadata for newsletters to base layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ADKaster committed Jul 31, 2024
1 parent 3ac29b4 commit eb30465
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/layouts/newsletter.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
import BaseLayout from "@/layouts/base.astro";
const { frontmatter } = Astro.props;
const { frontmatter, title, description, author, image } = Astro.props;
---

<BaseLayout>
<BaseLayout
title={title}
description={description}
author={author}
image={image}
>
<div class="min-h-screen">
<section class="hero hero_single">
<div class="container custom-row">
Expand Down
8 changes: 7 additions & 1 deletion src/pages/newsletter/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ const { newsletter } = Astro.props;
const { Content } = await newsletter.render();
---

<Layout frontmatter={newsletter.data}>
<Layout
frontmatter={newsletter.data}
title={newsletter.data.title}
description={newsletter.data.description}
image={newsletter.data.image}
author={newsletter.data.author}
>
<Content components={markdown} />
</Layout>

0 comments on commit eb30465

Please sign in to comment.