From 5fb252006065fdb926f79c6f600cfd5b57fdc84b Mon Sep 17 00:00:00 2001 From: Andrew <74398819+AndrewDTR@users.noreply.github.com> Date: Wed, 9 Oct 2024 13:07:50 -0500 Subject: [PATCH] more og images --- src/layouts/BaseLayout.astro | 6 +++++- src/layouts/Blog.astro | 6 +++++- src/pages/about.md | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index ca4a34e..98d7b8f 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -3,7 +3,7 @@ import Footer from "../components/Footer.astro"; import Header from "../components/Header.astro"; import "../styles/global.css"; -const { imgLink } = Astro.props; +const { imgLink, title, subtitle } = Astro.props; --- @@ -17,6 +17,10 @@ const { imgLink } = Astro.props; Andrew Moses {imgLink && } + {title && } + {subtitle && } + +
diff --git a/src/layouts/Blog.astro b/src/layouts/Blog.astro index a204546..d940416 100644 --- a/src/layouts/Blog.astro +++ b/src/layouts/Blog.astro @@ -5,7 +5,11 @@ const hasTags = frontmatter.tags && frontmatter.tags.length > 0; const imgLink = `${Astro.site.origin}/og/${frontmatter.slug}.png`; --- - +

{frontmatter.title}

{frontmatter.subtitle}

diff --git a/src/pages/about.md b/src/pages/about.md index 89c22bb..b66f02e 100644 --- a/src/pages/about.md +++ b/src/pages/about.md @@ -4,7 +4,7 @@ title: "Hello World" subtitle: "Things I've learned from saying Hello to the world" author: Andrew tags: ["one", "two", "three"] -slug: "hello-world" +slug: "about" --- ![Example image](/og/index.png)