我想为我的主页构建JSON-LD。在我的页面里我有:
我尝试像这样构建JSON-LD:
<script type="application/ld+json">
[
{
"@context": "http://schema.org",
"@type": "WebSite",
.
.
.
},
{
"@context": "http://schema.org",
"@type": "WebPage",
"mainEntity":{
"@type": "ItemList",
"itemListElement":[
{
"@type": "BlogPosting",
.
.// 4- one list of main items
.
}
...
]
}
.
.
.
}]
</script>如果我的结构是真的,
SiteNavigationElement和侧栏内容添加到这个JSON对象中?我是否必须添加另一个对象,还是可以将其插入WebPageSiteNavigationElement (以及除mainEntity之外的其他东西)吗?发布于 2016-12-09 00:35:10
(使用Microdata所能做的一切也可以用JSON完成,反之亦然。所以没有必要混在一起。但是,可能有一些使用者只支持特定特性的一种语法。)
可以使用SiteNavigationElement属性将hasPart添加到WebPage
{
"@context": "http://schema.org",
"@type": "WebPage",
"hasPart":
{
"@type": "SiteNavigationElement"
}
}但是使用SiteNavigationElement (和其他WebPageElement类型)是typically not useful,所以您可能想忽略它。
https://stackoverflow.com/questions/41050295
复制相似问题