2

文章或博客似乎都不适合有主题和讨论的论坛。或者文章是否考虑用于任何通用帖子或评论?

4

4 回答 4

4

根据消息,我将 Article 用于主题,将 ItemList 用于论坛中的主题列表。

于 2011-08-31T05:04:09.287 回答
3

https://schema.org/DiscussionForumPosting似乎是 schema.org 推荐的解决方案,他们说这是为了:

在讨论论坛上发帖。

他们甚至提供了 JSON_LD 示例:

<script type="application/ld+json">
{
  "@context":"http://schema.org",
  "@type":"DiscussionForumPosting",
  "@id":"http://www.reddit.com/r/webdev/comments/2gypch/is_schemaorg_still_a_thing/"
  "headline":"Is Schema.org still a thing?",
  "author": {
    "@type": "Person",
    "name": "haecceity123"
  },
  "interactionStatistic": {
    "@type": "InteractionCounter",
    "interactionType": "http://schema.org/CommentAction",
    "userInteractionCount": 25
  },
}

于 2016-08-04T19:32:48.130 回答
1

Stackoverflow 本身将QAPage用于 HTML 元素,将Question用于 question 元素Answer用于 Answer 元素。例子:

<html itemscope="" itemtype="http://schema.org/QAPage">
    ...
    <div itemprop="mainEntity" itemscope="" itemtype="http://schema.org/Question">
        <h1 itemprop="name"><a href="...">The title of question</a></h1>
        <div role="main" aria-label="Question and answers">

             <div class="question">
                 <div itemprop="text">
                     The text of question 
                 </div>
                 <div>
                     Answers Count: <span itemprop="answerCount">2</span>
                 </div>
             </div>

             <div class="answers">
                 <div itemprop="acceptedAnswer" itemscope="" itemtype="http://schema.org/Answer">
                     <div itemprop="text">
                         The text of answer
                     </div>
                 </div>
                 <div itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
                     <div itemprop="text">
                         The text of answer
                     </div>
                 </div>
             </div>
         </div>
     </div>
     ...
</html>

有关更多详细信息,您可以查看 Internet 上可用论坛的来源。此外,您可以通过结构化数据测试工具验证您的结构化数据。

于 2019-06-13T10:04:42.317 回答
0

JSON-LD 是模式的推荐解决方案,因此我正在寻找一些真实世界的示例。在 Schema 网站上,它提供了 DiscussionForumPosting 的描述:发布到讨论论坛。

这似乎表明主题中的每个帖子都应该有结构化数据(这对我来说很有意义)。

他们给出的带有interactionStatistic 属性的示例似乎表明这是针对某个主题中的第一个论坛帖子。

论坛(通常)由类别组成,类别由主题组成,每个主题有 1 个或多个表单帖子。

使用 DiscussionForumPosting 我们如何处理包含多个帖子的主题。大型论坛主题可以有很多页面和 100 多个帖子

于 2019-03-04T14:19:03.977 回答