以下Answer
模式在google的sdtt中给出警告:
此项应与之关联的页上缺少qapage标记项。
微观数据:
<div itemscope itemtype="http://schema.org/Question">
<h1 itemprop="name">What is attr_accessor in Ruby?</h1>
<div itemprop="upvoteCount">196</div>
<div itemprop="text">I am having difficulty understanding Ruby attr_accessors, can someone explain them?</div>
<div>asked <time itemprop="dateCreated" datetime="2010-11-04T20:07Z">Nov 11 '10 at 20:07</time></div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">someuser</span>
</div>
<div><span itemprop="answerCount">4</span> answers</div>
<div itemprop="suggestedAnswer acceptedAnswer" itemscope itemtype="http://schema.org/Answer">
<div itemprop="upvoteCount">1337</div>
<div itemprop="text">
(The text of the accepted answer goes here...).
</div>
<div>answered <time itemprop="dateCreated" datetime="2010-12-01T22:01Z">Dec 1 '10 at 22:01</time></div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">anotheruser</span></div>
</div>
<div itemprop="suggestedAnswer" itemscope itemtype="http://schema.org/Answer">
<div itemprop="upvoteCount">39</div>
<div itemprop="text">
(Another explanation would go here).
</div>
<div>answered <time itemprop="dateCreated" datetime="2010-12-06T21:11Z">Dec 6 '10 at 21:11</time></div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">lonelyuser1234</span></div>
</div>
</div>
这个标记现在对谷歌来说不正确吗?
最佳答案
正如警告所说,谷歌建议提供一个QAPage
项目,可能是为了符合谷歌的搜索结果功能之一。
您可以通过Question
属性将您的QAPage
与mainEntity
关联:
<div itemscope itemtype="http://schema.org/QAPage">
<div itemprop="mainEntity" itemscope itemtype="http://schema.org/Question">
<!-- … -->
</div>
</div>