我验证了 Google's Structured Data Testing Tool 上的以下 Comment
Schema.org 结构化数据但似乎无法识别 Comment
structure正确的是:
这是我的 HTML(针对单个评论)
<div class="comment-wrapper zoomIn animated" data-comment-id="40" data-level=
"0" data-user-id="28" id="comment-40" itemprop="comment" itemscope=
"http://schema.org/Comment">
<div class="comment-inner">
<div class="comment-title">
<span class="submitted-by"><span itemprop="creator" itemscope
itemtype="http://schema.org/Person"><span itemprop=
"name">Jane</span></span><span class="score" title=
"Score"><span></span>0</span> •</span>
<meta content="2015-12-09T06:28:59Z"><time class="date-submitted"
datetime="2015-12-09T06:28:59Z">a day ago</time>
</div>
<div class="comment-content">
<article class="comment-body">
<p itemprop='text'>fgdfg</p>
</article>
</div>
<div class="comment-options">
<span class="upvote-num" itemprop="upvoteCount">1</span>
</div>
<div class="notification"></div>
</div>
</div>
我的结构有什么问题吗?它应该识别 Comment
结构。它似乎只识别 Person
结构化数据。
最佳答案
您正在使用itemscope="http://schema.org/Comment"
,但它应该是:
itemscope itemtype="http://schema.org/Comment"
关于Google 结构化数据测试工具无法识别 Schema.org 评论,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34198688/