本文介绍了丰富网页摘要:rel =" nofollow"和RDFa的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用进行标记我的内容根据上的收藏集。我正在使用来执行此操作,并且现在遇到 rel 属性。我的一些链接确实有 rel =nofollow属性/值。由于RDFa Lite是RDFa的子集,所以 rel 属性被识别为附加标记。请参阅中以提取以下标记的数据:

I'm using Rich Snippets to markup my content according to the collections on schema.org. I am using RDFa Lite to do so and am now having a problem with the rel attribute. Some of my links do have the rel="nofollow" attribute/value. As RDFa Lite is a subset of RDFa, the rel attribute gets recognised as additional markup. Please see this upload to Google's Structured Data Testing Tool for the extracted data for the following markup:

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

问题当然是, Paid Link 不应该出现在结构化标记中。任何想法如何解决这个问题?

The problem is of course, that the Paid Link shouldn't appear in the structured markup. Any ideas how to solve this?

推荐答案

一种可能性是为您的Schema.org用法使用前缀。因为定义 schema for http://schema.org/ ,你甚至可以在没有在前缀中指定它属性优先:

One possibility is to use prefixes for your Schema.org usage. Because the RDFa Core Initial Context defines schema for http://schema.org/, you can even use it without specifying it in a prefix attribute first:

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

这篇关于丰富网页摘要:rel =&quot; nofollow&quot;和RDFa的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 07:57