Skip to content

Commit

Permalink
docs: adds documentation for json option (#482)
Browse files Browse the repository at this point in the history
* feat(Doc): adds json special tag info

* feat(Doc): fixes typo

* feat(Doc): removes unsafe example

* feat(Doc): fixes typo
  • Loading branch information
marcelxpfeifer authored and pimlie committed Oct 30, 2019
1 parent fa12530 commit 0145166
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,25 @@ When a metaInfo property has a `skip` attribute with truthy value it will not be
}
```

### json <Badge text="v2.1+"/>

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 <Badge text="v2.1+"/>

Expand Down

0 comments on commit 0145166

Please sign in to comment.