【问题标题】:Structured Data Testing Tool breadcrumb error结构化数据测试工具面包屑错误
【发布时间】:2016-08-26 07:11:31
【问题描述】:

我在我的网站上使用 schema.org (Breadcrumb) 和开放图形协议。 Google 的结构化数据测试工具将它们混合在一起并抛出错误。

您可以将代码复制并粘贴到工具中以查看错误消息。

我误解或做错了什么?感谢您的帮助。

代码如下:

<html lang="en" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
  <head>
    <meta property="og:url" content="http://example.com/examples/example" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="Examples and so on" />
    <meta property="og:description" content="A lot of examples here" />
    <meta property="og:image" content="http://example.com/example.jpg" />
  </head>
  <body>
    <ol class='breadcrumb' vocab='http://schema.org/' typeof='BreadcrumbList'>
      <li property='itemListElement' typeof='ListItem'><a property='item' typeof='WebPage' href='/'><span property='name'>Home</span></a><meta property='position' content='1'></li>
      <li property='itemListElement' typeof='ListItem'><a property='item' typeof='WebPage' href='/examples'><span property='name'>Examples</span></a><meta property='position' content='2'></li>
      <li property='itemListElement' typeof='ListItem'><a property='item' typeof='WebPage' href='/examples/example'><span property='name'>Examples and so on</span></a><meta property='position' content='3'></li>
    </ol>
  </body>
</html>

【问题讨论】:

    标签: html facebook-opengraph structured-data


    【解决方案1】:

    rdfa(opengraph) 和 microdata(schema) 不能在同一个 html 页面上使用

    "3) 我们将继续支持我们现有的丰富 sn-ps 标记格式。如果您已经使用微格式或 RDFa 在您的页面上完成了标记,我们将继续支持它。需要注意的一个警告: 虽然可以使用新的 schema.org 标记或继续使用现有的微格式或 RDFa 标记,但您应该避免在同一个网页上将这些格式混合在一起,因为这会使我们的解析器感到困惑。”

    来源:http://googlewebmastercentral.blogspot.in/2011/06/introducing-schemaorg-search-engines.html

    【讨论】:

    • 我应该注意,这个例子中的 BreadcrumbList 实现是在 RDFa 中,而不是在 Mircrodata 中。上例中没有微数据。微数据格式中的 BreadcrumbList 存在错误,因此 RDFa 或 JSON-LD 是 BreadcrumbList 的首选格式。从 Schema 的角度来看,OP 没有做错任何事情,这是 Google 的解析问题。
    猜你喜欢
    • 2019-09-30
    • 2013-08-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-16
    • 2015-01-01
    相关资源
    最近更新 更多