From 3d0f4857465e55815809719a4a4438e8a3cd16a0 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Jun 2025 12:19:01 +0000 Subject: feat: add Open Graph and JSON-LD support to Head component - Introduced OpenGraph component for enhanced social media sharing with Open Graph meta tags. - Updated Head component to include OpenGraph and JSON-LD for improved SEO and structured data representation. - Added comments for better clarity on meta tags and JSON-LD integration. --- src/components/Head.astro | 4 ++++ src/components/JsonLd.astro | 1 + src/components/OpenGraph.astro | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 src/components/OpenGraph.astro diff --git a/src/components/Head.astro b/src/components/Head.astro index a421915..0026886 100644 --- a/src/components/Head.astro +++ b/src/components/Head.astro @@ -1,6 +1,7 @@ --- import type { WithContext, Thing } from "schema-dts"; import JsonLd from "./JsonLd.astro"; +import OpenGraph from "./OpenGraph.astro"; type Props = { readonly description: string; @@ -13,6 +14,7 @@ const { description, title, schema } = Astro.props; --- + @@ -26,11 +28,13 @@ const { description, title, schema } = Astro.props; {title} + + diff --git a/src/components/JsonLd.astro b/src/components/JsonLd.astro index a589f7b..b58efd7 100644 --- a/src/components/JsonLd.astro +++ b/src/components/JsonLd.astro @@ -9,4 +9,5 @@ const { schema } = Astro.props; const json = JSON.stringify(schema); --- +