From 24b32005141490f00eddec6818d16bd877ccf4a4 Mon Sep 17 00:00:00 2001 From: "oe.kazuma" Date: Fri, 10 Mar 2023 17:40:41 +0900 Subject: [PATCH] docs: add documentation allowing arrays in JSON-LD schema --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8cee54a..d316193 100644 --- a/README.md +++ b/README.md @@ -574,7 +574,7 @@ JSON-LD allows for more customized and richer display, such as in search results To discover all the different content types that JSON-LD offers, go to: https://developers.google.com/search/docs/guides/search-gallery -It is also possible to use multiple `` components in a single page. +Tips: If you want to handle multiple JSON-LDs on one page, pass an array to the `schema`. ### Using `schema-dts` @@ -784,6 +784,68 @@ This plugin uses [schema-dts](https://github.com/google/schema-dts), so it provi /> ``` +### JSON-LD Multiple Examples + +```svelte + + + +``` + ## Types The following types can be imported from `svelte-meta-tags` @@ -814,7 +876,7 @@ interface MetaTagsProps { ```ts interface JsonLdProps { output?: 'head' | 'body'; - schema?: Thing | WithContext; + schema?: Thing | WithContext | Thing[] | WithContext[]; } ```