此处的所有内容http://schema.org/Review都告诉我,“评论”类型旨在用于实际产品页面。
您如何正确标记独立产品评论,或者页面上没有实际产品的评论页面?
这是我到目前为止(下文)。我只使用产品标题,因为它似乎符合规范要求。
有没有更好的方法来组织这个?
<article itemscope itemtype="http://schema.org/Product">
<div class="review-image"><img itemprop="image" src="//usercontent.rtacabinetstore.com/testimonial/59/2.jpg" alt=""></div>
<div class="review-image"><img itemprop="image" src="//usercontent.rtacabinetstore.com/testimonial/59/1.jpg" alt=""></div>
<div class="review-wrapper">
<h1 itemprop="name">Oak Kitchen Cabinets</h1>
<div class="review-text" class="review" itemscope itemtype="http://schema.org/Review">
<span itemprop="author">Bob Tester</span> Centennial, CO
<h3 itemprop="name">They were beautiful and easy to put together.</h3>
<q itemprop="reviewBody">I have to say I am so happy with the cabinets. We used the Oak line. They were beautiful and easy to put together (after the first one). delivery was as promised and again, just can't say how much I LOVE the cabinets. Have been getting a lot of rave reviews and posted on facebook with a link to your site.</q>
</div>
</div>
</article>
答案 0 :(得分:1)
SiteKickr,对于主要内容是对某些内容的评论的页面,最好使用Review类型作为主要模式类型并将其他类型嵌套在其中,如下所示:
<article itemscope itemtype="http://schema.org/Review">
<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product">
<h1 itemprop="name">Oak Kitchen Cabinets</h1>
</div>
<span itemprop="author">Bob Tester</span> Centennial, CO
<h3 itemprop="headline">They were beautiful and easy to put together.</h3>
<q itemprop="reviewBody">I have to say I am so happy with the cabinets. We used the Oak line. They were beautiful and easy to put together (after the first one). delivery was as promised and again, just can't say how much I LOVE the cabinets. Have been getting a lot of rave reviews and posted on facebook with a link to your site.</q>
</article>
但您确实需要定义正在审核的内容。因此,产品的名称必须至少在页面的某个位置。
答案 1 :(得分:1)
为了更好地参考,请参阅以下示例。这是我认为你想要实现的 -
http://www.google.com/webmasters/tools/richsnippets?q=uploaded:800501214281cda16fa0f257d5f818a3
<div itemscope itemtype="http://schema.org/Review">
<meta itemprop="itemreviewed" content="HGGHHJL"/>
<span itemprop="reviewRating">5</span> stars -
<b>"<span itemprop="name">A masterpiece of literature</span>" </b>
by <span itemprop="author">John Doe</span>,
Written on <meta itemprop="datePublished" content="2006-05-04">May 4, 2006
<span itemprop="reviewBody">I really enjoyed this book. It captures the essential
challenge people face as they try make sense of their lives and grow to adulthood.</span>
</div>
答案 2 :(得分:0)
如果您不被重复的数据困扰和/或不想用代码弄乱html,我建议您可以使用JSON格式。
<html>
<head>
<title>Legal Seafood</title>
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Review",
"itemReviewed": {
"@type": "Restaurant",
"image": "http://www.example.com/seafood-restaurant.jpg",
"name": "Legal Seafood",
"servesCuisine": "Seafood",
"telephone": "1234567",
"address" :{
"@type": "PostalAddress",
"streetAddress": "123 William St",
"addressLocality": "New York",
"addressRegion": "NY",
"postalCode": "10038",
"addressCountry": "US"
}
},
"reviewRating": {
"@type": "Rating",
"ratingValue": "4"
},
"name": "A good seafood place.",
"author": {
"@type": "Person",
"name": "Bob Smith"
},
"reviewBody": "The seafood is great.",
"publisher": {
"@type": "Organization",
"name": "Washington Times"
}
}
</script>
</head>
<body>
</body>
</html>
如果您坚持要使用HTML标记,那么事情就是这样:
<div itemscope itemtype="https://schema.org/Review">
<div itemprop="itemReviewed" itemscope itemtype="https://schema.org/Restaurant">
<img itemprop="image" src="/search/docs/data-types/markup/seafood-restaurant.jpg" alt="Catcher in the Rye"/>
<span itemprop="name">Legal Seafood</span>
<span itemprop="servesCuisine">Seafood</span>
<span itemprop="telephone">1234567</span>
<span itemprop="address">123 William St, New York</span>
</div>
<span itemprop="reviewRating" itemscope itemtype="https://schema.org/Rating">
<span itemprop="ratingValue">4</span>
</span> stars -
<b>"<span itemprop="name">A good seafood place.</span>" </b>
<span itemprop="author" itemscope itemtype="https://schema.org/Person">
<span itemprop="name">Bob Smith</span>
</span>
<span itemprop="reviewBody">The seafood is great.</span>
<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<meta itemprop="name" content="Washington Times">
</div>
</div>
这些是这里的示例:https://developers.google.com/search/docs/data-types/review-snippet
也可以在此处检查在线测试仪: https://search.google.com/structured-data/testing-tool