丰富的片段:rel="nofollow" 和 RDFa

2023-12-21

我在用着根据集合标记我的内容schema.org http://schema.org/。我在用RDFa精简版 http://www.w3.org/TR/rdfa-lite/这样做,我现在遇到了问题rel属性。我的一些链接确实有rel="nofollow"属性/值。由于 RDFa Lite 是 RDFa 的子集,因此rel属性被识别为附加标记。请参见此上传到 Google 的结构化数据测试工具 http://www.google.com/webmasters/tools/richsnippets?q=uploaded:800501754b4e210a2fb575c97d2fd493对于以下标记提取的数据:

<div vocab="http://schema.org/" typeof="SportsTeam">
  <span property="name">San Francisco 49ers</span>
  <div property="member" typeof="OrganizationRole">
    <div property="member" typeof="http://schema.org/Person">
      <span property="name">Joe Montana</span>
    </div>
    <span property="startDate">1979</span>
    <span property="endDate">1992</span>
    <span property="namedPosition">Quarterback</span>
   <a rel="nofollow" href="http://www.google.com/">A Paid Link</a>
</div>

问题当然是,付费链接不应出现在结构化标记中。有什么想法如何解决这个问题吗?


一种可能性是为您的 Schema.org 使用使用前缀。因为RDFa 核心初始上下文 http://www.w3.org/2011/rdfa-context/rdfa-1.1定义schema for http://schema.org/,您甚至可以使用它而无需在prefix属性第一:

<div typeof="schema:SportsTeam">
  <span property="schema:name">San Francisco 49ers</span>
  <div property="schema:member" typeof="schema:OrganizationRole">
    <div property="schema:member" typeof="schema:Person">
      <span property="schema:name">Joe Montana</span>
    </div>
    <span property="schema:startDate">1979</span>
    <span property="schema:endDate">1992</span>
    <span property="schema:namedPosition">Quarterback</span>
   <a rel="nofollow" href="http://www.google.com/">A Paid Link</a>
</div>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

丰富的片段:rel="nofollow" 和 RDFa 的相关文章

随机推荐