我有一些结构化数据在我的网站中使用微数据实现,以便谷歌和其他搜索引擎可以解析它并显示适当的丰富片段。我已为所用的所有微数据标记添加了适当的标记,但我无法在使用Rich Snippets测试工具对其进行测试时查看我网站的丰富网页摘要。我已经浏览了Google网站管理员的使用指南和常见问题部分,但无济于事。schema.org标记和嵌套复习“ApartmentComplex”
在调试html时,我发现以下代码片段在提供给Rich Snippets测试工具时已成功显示丰富网页摘要。
<div class="row">
<div class="col-sm-12">
<div class="page-header">
<h1><span itemprop="name">T Park </span></h1>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress" class="address">
<span itemprop="streetAddress">1 Scenic Park</span>
<span itemprop="postalCode" class="hidden">123456</span>
<span itemprop="addressRegion" class="hidden">Central </span>
<span itemprop="addressCountry" class="hidden">Singapore</span>
</div>
</div>
</div>
</div>
<div class="col-sm-6 box-map">
<h2>Location</h2>
</div>
<div style="margin-bottom:0px;" itemprop="review" itemscope itemtype="http://schema.org/Review" class="jumbotron row">
<h2>T Park Reviews</h2>
<br>
<meta itemprop="itemReviewed" content="T Park">
<div id="reviews" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content="1">
<meta itemprop="ratingValue" content="9">
<meta itemprop="bestRating" content="10"><span>Rating: 9/10</span>
</div>
<br><span itemprop="reviewBody">Lorem Ipsum....</span>
<br><strong itemprop="author" class="row pull-right">John May</strong>
</div>
然而只要如显示在下面的代码段ApartmentComplex的包围标记被添加,富片段是不可见的。
<div itemscope itemtype="http://schema.org/ApartmentComplex" class="container">
<div class="row">
<div class="col-sm-12">
<div class="page-header">
<h1><span itemprop="name">T Park </span></h1>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress" class="address">
<span itemprop="streetAddress">1 Scenic Park</span>
<span itemprop="postalCode" class="hidden">123456</span>
<span itemprop="addressRegion" class="hidden">Central</span>
<span itemprop="addressCountry" class="hidden">Singapore</span>
</div>
</div>
</div>
</div>
<div style="margin-bottom:0px;" itemprop="review" itemscope itemtype="http://schema.org/Review" class="jumbotron row">
<h2>T Park Reviews</h2>
<br>
<meta itemprop="itemReviewed" content="T Park">
<div id="reviews" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content="1">
<meta itemprop="ratingValue" content="9">
<meta itemprop="bestRating" content="10"><span>Rating: 9/10</span>
</div>
<br><span itemprop="reviewBody">Lorem Ipsum....</span>
<br><strong itemprop="author" class="row pull-right">John May</strong>
</div>
</div>
因此,假如我的网页是关于ApartmentComplex,我想包括它的评论,我应该如何组织/巢状标记?
这似乎是一种有效的方式。我刚刚测试并发现,在“并行”中使用ApartmentComplex和Review似乎也起作用。你认为哪种方法更好? – rgareth 2014-10-12 20:25:58
任何一种方式听起来都有效 – 2014-10-13 08:50:08