From 4d0ae0c871ed2be8fbc7cc0ab0df4e269fb0188a Mon Sep 17 00:00:00 2001 From: log101 Date: Tue, 13 Aug 2024 18:02:02 +0300 Subject: [PATCH] feat: add og url field --- src/layouts/Layout.astro | 5 +++-- src/pages/[category]/[slug]/index.astro | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index ebbda1c..138266d 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -3,9 +3,10 @@ interface Props { title: string; ogTitle?: string; ogDescription?: string; + ogURL?: string; } -const { title, ogTitle, ogDescription } = Astro.props; +const { title, ogTitle, ogDescription, ogURL } = Astro.props; import "../styles/main.css"; --- @@ -20,7 +21,7 @@ import "../styles/main.css"; - + + ogDescription={entry.data.summary} + ogURL={URL.toString()}>
{ entry.collection === "blog" ? (