mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-25 09:10:33 +03:00
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
This commit is contained in:
@@ -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
|
### body
|
||||||
### pbody <Badge text="v2.1+"/>
|
### pbody <Badge text="v2.1+"/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user