Html 结构化数据测试工具breadcrumb错误

Html 结构化数据测试工具breadcrumb错误,html,facebook-opengraph,structured-data,Html,Facebook Opengraph,Structured Data,我在我的网站上使用schema.org(Breadcrumb)和opengraph协议。谷歌结构化数据测试工具将两者混合,并抛出一个错误 您可以将代码复制并粘贴到工具以查看错误消息 我误解了什么或做错了什么?谢谢你的帮助 代码如下: <html lang="en" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#"> <head> <meta property="og:url" content=

我在我的网站上使用schema.org(Breadcrumb)和opengraph协议。谷歌结构化数据测试工具将两者混合,并抛出一个错误

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

我误解了什么或做错了什么?谢谢你的帮助

代码如下:

<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>

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

    “3)我们将继续支持现有的富代码段标记格式。如果您已经使用微格式或RDFa在页面上进行了标记,我们将继续支持它。需要注意的一点是:尽管可以使用新的schema.org标记,也可以继续使用现有的微格式或RDFa标记,但应避免在同一网页上混合这些格式,因为这可能会混淆我们的解析器。”


    来源:

    我应该注意,本例中的面包屑列表实现是在RDFa中,而不是在Mircrodata中。上面的示例中没有微数据。面包屑列表在微数据格式中存在一个bug,因此RDFa或JSON-LD是面包屑列表的首选格式。OP从模式角度看没有做错任何事情,这是一个Google解析问题。