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, 12 insertions, 0 deletions
diff --git a/src/components/JsonLd.astro b/src/components/JsonLd.astro
new file mode 100644
index 0000000..a589f7b
--- /dev/null
+++ b/src/components/JsonLd.astro
@@ -0,0 +1,12 @@
+---
+import type { WithContext, Thing } from "schema-dts";
+
+type Props = {
+ readonly schema: WithContext<Thing>;
+};
+
+const { schema } = Astro.props;
+const json = JSON.stringify(schema);
+---
+
+<script is:inline type="application/ld+json" set:html={json} />