From 3f7508a4f775d6219f9a55c104b8509f43e61346 Mon Sep 17 00:00:00 2001 From: Ben Parker Date: Fri, 11 Oct 2024 08:37:11 +0100 Subject: [PATCH 01/15] add image prop to basehead --- src/components/head/BaseHead.astro | 3 +-- src/layouts/BaseLayout.astro | 10 ++++++++-- src/layouts/BlogLayout.astro | 19 +++++++++++++------ src/layouts/Flow.astro | 2 +- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/components/head/BaseHead.astro b/src/components/head/BaseHead.astro index e127d0e..d06c463 100644 --- a/src/components/head/BaseHead.astro +++ b/src/components/head/BaseHead.astro @@ -7,9 +7,8 @@ import "../../styles/global.scss"; const GA_ID = import.meta.env.GA_ID; -const { title = "", description = "", type = "website" } = Astro.props; +const { title = "", description = "", type = "website", social_image = "" } = Astro.props; -const social_image = ""; --- diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 101d169..9be106f 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -7,13 +7,19 @@ interface Props { title: string; description: string; type?: string; + social_image?: string; } -const { title, description, type = "website" } = Astro.props; +const { title, description, type = "website", social_image } = Astro.props; --- - + diff --git a/src/layouts/BlogLayout.astro b/src/layouts/BlogLayout.astro index af45779..985d5f7 100644 --- a/src/layouts/BlogLayout.astro +++ b/src/layouts/BlogLayout.astro @@ -37,7 +37,7 @@ const { } = Astro.props; const { data: author } = (await getEntry( - authorRef + authorRef, )) as CollectionEntry<"authors">; const tags = await getEntries(tagList); @@ -62,7 +62,7 @@ const summary = .use(stripMarkdown, { remove: ["heading"], }) - .process(body) + .process(body), ) .split(" ") .slice(0, 30) @@ -88,15 +88,21 @@ if (related.length > 0) { } --- - +
+ class="z-0" + >
+ ]} + >

{title}

@@ -153,7 +159,8 @@ if (related.length > 0) {