aboutsummaryrefslogtreecommitdiff
path: root/src/components/JsonLd.astro
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/JsonLd.astro')
-rw-r--r--src/components/JsonLd.astro12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/components/JsonLd.astro b/src/components/JsonLd.astro
index b58efd7..d12cb78 100644
--- a/src/components/JsonLd.astro
+++ b/src/components/JsonLd.astro
@@ -1,12 +1,18 @@
---
-import type { WithContext, Thing } from "schema-dts";
+import type { Thing } from "schema-dts";
type Props = {
- readonly schema: WithContext<Thing>;
+ readonly schema: Thing[];
};
const { schema } = Astro.props;
-const json = JSON.stringify(schema);
+
+const payload = {
+ "@context": "https://schema.org",
+ "@graph": schema,
+};
+
+const json = JSON.stringify(payload);
---
<!-- JSON-LD -->