我看到关于这个主题的另一个类似问题,但没有被接受的正确答案或示例。 这个元素的格式应该是什么样的? BreadcrumbList有很好的文档并包含列表,但SiteNavigationElement没有。
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SiteNavigationElement",
"@graph": [
{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "http://www.example.com/",
"url": "http://www.example.com/",
"name": "Home"
}
},
{
"@type": "ListItem",
"position": 2,
"item": {
"@id": "http://www.example.com/contact.html",
"url": "http://www.example.com/contact.html",
"name": "Contact"
}
},
]
}
</script>
更新:
我一直在尝试,现在发现一个可行的方案。但它的结构是否正确呢?
<script type="application/ld+json">
//<![CDATA[
{
"@context": "https:\/\/schema.org\/",
"@type": "SiteNavigationElement",
"headline": "Headline for Site Navigation",
"name": [
"Home",
"Tours",
"Transfers",
"Taxis",
"Contact"
],
"description": [
"Homes Desc.",
"Tours Desc.",
"Transfers Desc.",
"Taxis Desc.",
"Contact Desc."
],
"url": [
"http://www.example.com/",
"http://www.example.com/tours/",
"http://www.example.com/transfers/",
"http://www.example.com/taxis/",
"http://www.example.com/contact.html"
]
}
//]]>
</script>