14

背景/上下文

由于 schema.org 相对较新,也许这个问题会引发更多的讨论,而不是一个明确的答案。无论哪种方式,希望可以从其他人的应用程序/经验中获得一些学习。

研究了http://schema.org文档页面 - 虽然似乎有大量属性(阅读:itemprop属性)可用于丰富博客文章,但似乎存在一些不一致和“灰色区域”标记博客评论的最佳方法。让我举个例子:

博客的 schema.org 文档可以在Thing > CreativeWork > Blog中找到,作为参考,博客文章位于Thing > CreativeWork > Article > BlogPosting

到目前为止,上述页面上的文档和标记示例提供了足够的参考来格式化博客索引页面,以及单个帖子中的大部分内容(authorpubDatearticleBodyinteractionCount等)

问题:将 UserInteraction 模式应用于单个博客评论

当我们开始查看单个 UserInteraction 元素(博客评论)时interactionCount,事情变得有点模糊。该文档将我们引导至Thing > Event > UserInteraction > UserComments,并被描述为“用户交互:关于项目的评论”。然而,所有建议的属性UserInteraction都是针对物理事件的。

在此模式的文档中,似乎与博客评论相关的唯一属性是description; 可用于评论正文感觉缺少的是用户对博客文章发表评论的特定上下文。也没有证据表明所述评论的示例标记,即使在网站上搜索“评论”似乎也没有产生任何清晰度。

有没有人使用 schema.org 标记他们的博客 - 你是如何处理/解决这个问题的?

我还将通过 schema.org 反馈表提出这个问题,如果有任何问题,我会更新这篇文章。

4

5 回答 5

11

看看这里的例子http://schema.org/WebPage并注意评论是如何用于书籍的。

您可以对文章中的评论执行相同的操作,这是一个示例:

 <div itemscope itemtype="http://schema.org/Article"> 

     <-- Article content -->

     <div itemprop="comment" itemscope itemtype="http://schema.org/UserComments">     
       <meta itemprop="discusses" content="A masterpiece of literature" />             
       <span itemprop="creator">John Doe</span>   
       <time itemprop="commentTime" datetime="2011-05-08T19:30">May 8, 7:30pm</time>    

       <span itemprop="commentText">I really enjoyed this book. It captures the essential  
       challenge people face as they try make sense of their lives.</span>    
     </div>

     <div itemprop="comment" itemscope itemtype="http://schema.org/UserComments">     
       <meta itemprop="discusses" content="A masterpiece of literature" />             
       <span itemprop="creator">John Doe</span>   
       <time itemprop="commentTime" datetime="2011-05-08T19:30">May 8, 7:30pm</time>    

       <span itemprop="commentText">I really enjoyed this book. It captures the essential  
       challenge people face as they try make sense of their lives.</span>    
     </div>

 </div>
于 2011-09-19T00:22:57.943 回答
5

几年后,引入了http://schema.org/Comment 。

对项目的评论 - 例如,对博客文章的评论。评论的内容通过“text”属性表达,其主题通过“about”属性表达,这些属性与所有 CreativeWorks 共享。

于 2014-03-12T03:27:02.720 回答
3

我的理解是这不是UserComments为了标记博客评论。它仅作为与on 属性一起使用的可能交互类型之一存在,例如:interactionCountCreativeWork

<div itemscope itemtype="http://schema.org/Article">
  <span itemprop="http://schema.org/interactionCount">UserComments:7</span>
</div>

我会将每条评论标记为CreativeWorkor Article,并确保它们的about属性指向他们正在评论的博客文章。

于 2011-07-01T16:32:39.900 回答
1

到目前为止,布莱斯似乎是正确的。schema.org/Comment 上使用的示例是:

对项目的评论 - 例如,对博客文章的评论。评论的内容通过“text”属性表达,其主题通过“about”属性表达,这些属性与所有 CreativeWorks 共享。

于 2012-05-30T22:02:01.657 回答
0

<meta>当我的内容与数据匹配时,我个人不喜欢这种方法。由于 schema.org 尚未完全记录,我继续这样做:

<span itemprop="interactionCount">100</span>

和/或这个:

<span itemprop="interactionCount">100 comments</span>

我知道它没有在任何地方指定“UserComments”。想法?

于 2013-01-17T02:36:33.263 回答