diff options
Diffstat (limited to 'src/components/JsonLd.astro')
| -rw-r--r-- | src/components/JsonLd.astro | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/JsonLd.astro b/src/components/JsonLd.astro new file mode 100644 index 0000000..b58efd7 --- /dev/null +++ b/src/components/JsonLd.astro @@ -0,0 +1,13 @@ +--- +import type { WithContext, Thing } from "schema-dts"; + +type Props = { + readonly schema: WithContext<Thing>; +}; + +const { schema } = Astro.props; +const json = JSON.stringify(schema); +--- + +<!-- JSON-LD --> +<script is:inline type="application/ld+json" set:html={json} /> |
