我在我的网站上使用 schema.org 微数据,但我正在努力解决 BreadcrumbList如 Google 的 structured data testing tool不会验证它。它看起来是正确的,我看不出有什么问题。
您可以点击上面的链接来查看错误,但总而言之,Google 表示每个项目的 itemtype 属性都有无效值,并且还提示列表中缺少 mainEntityOfPage 属性。我确实尝试在元标记中添加 mainEntityOfPage 但它仍然提示它。
我做错了什么?
<ul itemscope="" itemtype="http://schema.org/BreadcrumbList">
<li class="home" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/" title="Go to Home Page" itemprop="item"><span itemprop="name">Home</span></a>
<span>/ </span>
<meta itemprop="position" content="1">
</li>
<li class="category3" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/rc-cars.html" title="" itemprop="item"><span itemprop="name">RC Cars</span></a>
<span>/ </span>
<meta itemprop="position" content="2">
</li>
<li class="category10" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/rc-cars/car-kits.html" title="" itemprop="item"><span itemprop="name">Car Kits</span></a>
<span>/ </span>
<meta itemprop="position" content="3">
</li>
<li class="product">
<strong>Tamiya Lunch Box. No ESC [58347]</strong>
</li>
</ul>
最佳答案
面包屑必须使用 breadcrumb 属性,并将其放入另一个 itemscope 中(最好是 http://schema.org/WebPage )。您还缺少 itemprop="breadcrumb
,它必须位于您的 itemscope
之前。
<div class="breadcrumbs" itemscope itemtype="http://schema.org/WebPage">
<ul itemprop="breadcrumb" itemscope="" itemtype="http://schema.org/BreadcrumbList">
<li class="home" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/" title="Go to Home Page" itemprop="item"><span itemprop="name">Home</span></a>
<span>/ </span>
<meta itemprop="position" content="1">
</li>
<li class="category3" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/rc-cars.html" title="" itemprop="item"><span itemprop="name">RC Cars</span></a>
<span>/ </span>
<meta itemprop="position" content="2">
</li>
<li class="category10" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/rc-cars/car-kits.html" title="" itemprop="item"><span itemprop="name">Car Kits</span></a>
<span>/ </span>
<meta itemprop="position" content="3">
</li>
<li class="product">
<strong>Tamiya Lunch Box. No ESC [58347]</strong>
</li>
</ul>
关于schema.org - 为什么我的 http ://schema. org/BreadcrumbList 未验证?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32249948/