From f9510a003fb65bcab3acbd2b7a9ee9c682e12f28 Mon Sep 17 00:00:00 2001 From: afterlifepro Date: Wed, 13 Aug 2025 20:55:37 +0100 Subject: [PATCH] Make graph optional in base --- src/components/Base.astro | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/components/Base.astro b/src/components/Base.astro index ef98500..e07a0c6 100644 --- a/src/components/Base.astro +++ b/src/components/Base.astro @@ -3,7 +3,7 @@ import Header from "./Header.astro"; interface Props { title?: string; - graph: { + graph?: { description: string; url: string; type?: "website" | "article" | `${"music" | "video"}.${string}`; @@ -26,22 +26,28 @@ const title = Astro.props.title {title} - + { + graph && ( + + - - - - - - {graph.image && } - - - - - - {graph.image && } + {/* opengraph */} + + + + + {graph.image && } + {/* twt card markup */} + + + + {graph.image && } + + ) + } +