在我网站的大多数页面上,我都使用了 Microdata。某些内容,例如创建了数据博客文章,并且评论评级显示在搜索结果中。其他信息,例如 Person 和 Breadcrumb 数据则没有。
人
在我的主页上,我有以下代码。将其粘贴到Google 结构化数据测试工具中会显示“Abergavenny Wales - Web Developer”,但将 URL 粘贴到其中并不会显示此内容,知道为什么吗?
<div id="banner" itemscope itemtype="http://schema.org/Person">
<h1>Working <a href="/freelance-web-developer" title="Freelance Web Design & Development">Web Solutions</a></h1>
<h2>
<a href="/services/freelance-ruby-on-rails-development-cardiff-abergavenny-wales-uk" title="Freelance Ruby on Rails Web Developer">Ruby on Rails</a>, <a href="/services/freelance-sinatra-ruby-development-cardiff-abergavenny-wales-uk" title="Freelance Sinatra Web Developer">Sinatra</a> & <a href="/services/freelance-drupal-developer-designer-cardiff-abergavenny-wales-uk">Drupal</a> Development by <br class="responsive" />
<a href="http://www.netmagazine.com/features/net-awards-2011-top-10-developers" title=".net Awards 2011: top 10 developers" rel="nofollow">Award Nominated</a> <a href="/freelance-web-developer"><span itemprop="jobtitle">Web Developer</span></a><br class="responsive" />
<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">Based in <a href="/services/abergavenny-uk-web-design-development" title="Web Designer & Developer in Abergavenny"><span itemprop="addressLocality">Abergavenny</span></a>, <span itemprop="addressRegion">Wales</span>, <span itemprop="addressCountry">UK</span></span>.
</h2>
</div>
面包屑
面包屑也是如此。以下代码在粘贴到Google 结构化数据测试工具中时有效,但 URL 不返回面包屑。
<ol id="breadcrumb">
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="/services" itemprop="url">
<span itemprop="title">Services</span>
</a> ›
</li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="/services/freelance-ruby-on-rails-development-cardiff-abergavenny-wales-uk" itemprop="url">
<span itemprop="title">Ruby on Rails Development</span>
</a>
</li>
</ol>