我在网站上使用schema.org(Breadcrumb)和开放图协议(protocol)。 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>

最佳答案

rdfa(opengraph)和微数据(schema)不能在同一html页面上使用

“3)我们将继续支持我们现有的丰富网页摘要标记格式。如果您已经使用微格式或RDFa在页面上进行了标记,我们将继续支持它。使用新的schema.org标记或继续使用现有的微格式或RDFa标记,您应避免在同一网页上混合使用这些格式,因为这会使我们的解析器感到困惑。”

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

关于html - 结构化数据测试工具痕迹错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36966879/

10-12 12:50
查看更多