我的目标是基于this正确输出JSON-D。问题在于该网站具有多个类别,这些类别在一个页面上包含多个产品。该网站的结构如下:
Amarelo K
Amarelo D
Amarelo C
我认为我可以使用这样的东西
{
"@context": "http://schema.org",
"@type": "CollectionPage",
"mainEntity": {
"@type": "ItemList",
"itemListElement": [
{
"@type": "ListItem",
"position": "1",
"name": "Amarelo C",
"item": {
"@type": "ItemList",
"itemListElement": [
{
"@type": "Product",
"name": "Amarelo C 101",
"image": ["LinkToTheProduct101Img"],
"url": "LinkToTheProduct#101"
},
{
"@type": "Product",
"name": "Amarelo C 102",
"image": ["LinkToTheProduct102Img"],
"url": "LinkToTheProduct#102"
},
{
"@type": "Product",
"name": "Amarelo C 103",
"image": ["LinkToTheProduct103Img"],
"url": "LinkToTheProduct#103"
}
]
}
},
{
"@type": "ListItem",
"position": "2",
"name": "Amarelo D",
"item": {
"@type": "ItemList",
"itemListElement": [
{
"@type": "Product",
"name": "Amarelo D 101",
"image": ["LinkToTheProduct101Img"],
"url": "LinkToTheProduct#101"
},
{
"@type": "Product",
"name": "Amarelo D 102",
"image": ["LinkToTheProduct102Img"],
"url": "LinkToTheProduct#102"
},
{
"@type": "Product",
"name": "Amarelo D 103",
"image": ["LinkToTheProduct103Img"],
"url": "LinkToTheProduct#103"
}
]
}
},
{
"@type": "ListItem",
"position": "3",
"name": "Amarelo C",
"item": {
"@type": "ItemList",
"itemListElement": [
{
"@type": "Product",
"name": "Amarelo C 101",
"image": ["LinkToTheProduct101Img"],
"url": "LinkToTheProduct#101"
},
{
"@type": "Product",
"name": "Amarelo C 102",
"image": ["LinkToTheProduct102Img"],
"url": "LinkToTheProduct#102"
},
{
"@type": "Product",
"name": "Amarelo C 103",
"image": ["LinkToTheProduct103Img"],
"url": "LinkToTheProduct#103"
}
]
}
}
]
}
}
它甚至成功通过了Google Structured Data Testing Tool,但我想知道我是否没有错过任何事情...