有人能发现我下面的代码有什么问题吗? (它不会在 Google 结构化测试工具中进行验证。)我正在尝试创建 JSON-LD 代码以添加到具有多种待售产品的页面。
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@graph": [
{
"@type": “Product”,
"name": “tshirt",
“description”: "test copy 1.”,
“image”: “image.jpg”
},
{
"@type": “Product”,
"name": “tshirt 2",
“description”: "test copy 2.”,
“image”: “image2.jpg”
}
]
}
</script>
任何帮助深表感谢!
您正在使用“
代替"
在某些地方。
替换这些,您的代码片段将验证:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@graph": [
{
"@type": "Product",
"name": "tshirt",
"description": "test copy 1.",
"image": "image.jpg"
},
{
"@type": "Product",
"name": "tshirt 2",
"description": "test copy 2.",
"image": "image2.jpg"
}
]
}
</script>
Update:此代码片段未通过使用进行验证谷歌富媒体搜索结果测试 https://search.google.com/test/rich-results?id=uFt4nco5q4smstE14zONtw不再了。架构正在积极开发中,因此有时需求会在一段时间后发生变化。对于产品列表,谷歌建议所谓的carousel https://developers.google.com/search/docs/data-types/carousel.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)