带有schema.org的面包屑未显示在Google丰富的摘要测试工具中



我已经测试了schema.org breadcrumb用Google Rich Sippets测试工具进行了示例。

<div itemprop="breadcrumb">
  <a href="category/books.html">Books</a> >
  <a href="category/books-literature.html">Literature & Fiction</a> >
  <a href="category/books-classics">Classics</a>
</div>

结果是该工具未识别它。

那么,是否有错误或语法问题?如果是这样,什么是正确的语法?

您的问题与这个问题如何实现schema.org标记?

根据Google Webmaster Central Help论坛的说法,专家不建议您暂时使用Schema.org Backcrumb Markup,看来" Schema.org BreadCrumb结构中存在某种故障"。取而代之的是,它劝告使用data-vocabulary.org面包屑标记,Google和其他搜索引擎也可以轻松阅读。

data-vocabulary.org面包屑标记示例:

<div>
  <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="http://www.example.com/" itemprop="url">
      <span itemprop="title">example</span>
    </a> >
  </span>  
  <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="http://www.example.com/fashion/" itemprop="url">
      <span itemprop="title">Fashion</span>
    </a> >
  </span>  
  <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="http://www.example.com/fashion/women/" itemprop="url">
      <span itemprop="title">Women</span>
    </a> >
  </span>
  <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="http://www.example.com/fashion/women/boots/" itemprop="url">
      <span itemprop="title">Boots</span>
    </a>
  </span>
</div>

您可以将Microdata标记用于BreadCrumb,如此Google链接所建议的

它肯定会在Google Rich片段测试工具中反映。

您是否有itemtype="http://schema.org/WebPage"的容器元素?请参阅http://schema.org/webpage。

的示例

您还可以看到一个问题如何实现schema.org标记?

应在页面上设置为itemType。

现在您可以立即开始使用基于schema.org的面包板标记。Google正在支持它,这很好。您可以选择格式JSON-LD(优选),RDFA,Microdata。另一个好处是,如果您的产品需要,您可以定义多个面包屑,通常是这种情况。

在Microdata支持的情况下,您可以做到这一点:

<ol itemscope itemtype="http://schema.org/BreadcrumbList">
  <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://www.yoursite.com">
        <span itemprop="name">Home</span></a>
    <meta itemprop="position" content="1" />
  </li>
  ›
  <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://www.yoursie.com/category/books.html">
      <span itemprop="name">Books</span></a>
    <meta itemprop="position" content="2" />
  </li>
  ›
  <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://www.yoursie.com/category/books-literature.html">
      <span itemprop="name">Literature & Fiction</span></a>
    <meta itemprop="position" content="3" />
  </li>
  ›
  <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://www.yoursie.com/category/books-classics.html">
      <span itemprop="name">Classics</span></a>
    <meta itemprop="position" content="4" />
  </li>
</ol>

注意位置值的使用情况,建议使用有序列表('ol')。

执行此操作后,您可以要求Google显示您的站点名称,而不是位于1号位置的"家庭"。为了实现这一目标,请在您的主页上使用它:

<head itemscope itemtype="http://schema.org/WebSite">
<title itemprop='name'>Your Site Name</title>
<link rel="canonical" href="http://www.yoursite.com" itemprop="url">

有关任何事物

相关内容

最新更新