From 0145166b0899098734e01420b85581187aae5b12 Mon Sep 17 00:00:00 2001 From: Marcel Pfeifer <40826752+marcelxpfeifer@users.noreply.github.com> Date: Wed, 30 Oct 2019 12:59:09 +0100 Subject: [PATCH] docs: adds documentation for json option (#482) * feat(Doc): adds json special tag info * feat(Doc): fixes typo * feat(Doc): removes unsafe example * feat(Doc): fixes typo --- docs/api/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/api/README.md b/docs/api/README.md index de1beaa..1a8fbd4 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -641,6 +641,25 @@ When a metaInfo property has a `skip` attribute with truthy value it will not be } ``` +### json + +The `json` attribute in a metaInfo property allows you to render JSON content within a script tag, while still sanitizing the keys and values. For example this can be used to render JSON-LD. + +```js +{ + metaInfo: { + script: [{ + type: 'application/ld+json', + json: { + '@context': 'http://schema.org', + '@type': 'Organization', + name: 'NuxtJS' + } + }] + } +} +``` + ### body ### pbody