diff options
Diffstat (limited to 'src/components/JsonLd.astro')
-rw-r--r-- | src/components/JsonLd.astro | 12 |
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} /> |