我有一个带有“微数据”和“ json + ld”代码的产品页面。这两个代码都引用相同的@id URI对象(http://www.example.org/product#this),因此我希望“混合/合并”这两个属性,但是结构化数据测试工具却显示2个“单独的” “产品如此。。。
1- Google是否支持在同一页面中使用两种语法?
2-实施得好吗?我可以使用微数据的itemId和json + ld的@id将两个代码引用到同一对象吗?
3-就结构数据索引而言,这会损坏我的页面吗?
谢谢
<div itemscope itemtype="http://schema.org/Product" itemid="http://www.example.org/product#this">
<a itemprop="url" href="http://www.example.org/product">
<div itemprop="name"><strong>Product Name</strong></div></a>
<div itemprop="description">Product Description</div>
<div itemprop="brand" itemscope itemtype="http://schema.org/Organization"><span itemprop="name">Product Brand</span></div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <span itemprop="price">100</span><link itemprop="itemCondition" href="http://schema.org/NewCondition" /> New</div>
</div>
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@id": "http://www.example.org/product#this",
"name": "Product Name",
"@type": "Product",
"image": "http://www.example.com/anvil_executive.jpg",
"mpn": "925872",
"brand": {
"@type": "Thing",
"name": "ACME"
},
"offers": {
"@type": "Offer",
"priceCurrency": "USD",
"price": "119.99",
"itemCondition": "http://schema.org/UsedCondition",
"availability": "http://schema.org/InStock"
}
}
</script>
我的猜测是Google的结构化数据测试工具不支持不同的语法,因为如果使用相同的语法,它似乎可以工作。但是,由于它们仍然正确显示URI(http://www.example.org/product#this
在两种情况下),您可能会争辩说,仅仅是工具的界面无法合并它们。
但是,据我所知,Google仍然没有文档来支持这些主题URI(但这并不一定意味着它们不支持这些URI),因此对它们而言可能并不重要。
如果使用http://linter.structured-data.org/,您的示例可以很好地工作:它创建一个具有两个品牌和两个商品的商品。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句