Html 论坛应使用哪种schema.org类型?
无论是文章还是博客似乎都不适合有主题和讨论的论坛。或者文章是否考虑用于任何一般性的帖子或评论?根据消息,我使用文章作为主题,使用项目列表作为论坛中的主题列表。似乎是schema.org推荐的解决方案,他们说这是为了: 发布到讨论论坛的帖子 它们甚至提供了一个JSON\u LD示例:Html 论坛应使用哪种schema.org类型?,html,schema.org,microformats,Html,Schema.org,Microformats,无论是文章还是博客似乎都不适合有主题和讨论的论坛。或者文章是否考虑用于任何一般性的帖子或评论?根据消息,我使用文章作为主题,使用项目列表作为论坛中的主题列表。似乎是schema.org推荐的解决方案,他们说这是为了: 发布到讨论论坛的帖子 它们甚至提供了一个JSON\u LD示例: <script type="application/ld+json"> { "@context":"http://schema.org", "@type":"DiscussionForumPost
<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
},
}
{
“@context”:”http://schema.org",
“@type”:“对umposting的讨论”,
“@id”:”http://www.reddit.com/r/webdev/comments/2gypch/is_schemaorg_still_a_thing/"
“标题”:“Schema.org仍然是一个东西吗?”,
“作者”:{
“@type”:“Person”,
“名称”:“HAECESS 123”
},
“互动统计”:{
“@type”:“InteractionCounter”,
“交互类型”:http://schema.org/CommentAction",
“userInteractionCount”:25
},
}
JSON-LD是模式的推荐解决方案,因此我正在寻找一些真实世界的示例。在Schema网站上,它为DiscussionForumPosting提供了描述:发布到讨论论坛 这似乎表明主题中的每个帖子都应该有结构化数据(这对我来说很有意义) 他们给出的interactionStatistic属性的例子似乎表明这是一个主题中的第一篇论坛帖子 论坛由类别组成(通常),类别由主题组成,每个主题有一个或多个表单帖子 通过讨论umposting,我们如何处理多篇文章的主题。大型论坛主题可以有许多页面和100多篇帖子Stackoverflow本身用于HTML元素,用于提问元素,用于回答元素。 例如:
...
问题的案文
答案:2
答案的文本
答案的文本
...
有关更多详细信息,您可以查看internet上可用论坛的来源。此外,您还可以通过验证结构化数据。以及如何验证主题中的所有回复?你能在项目列表中找到一篇文章吗?可能不是。文档中说:“任何种类的项目列表”,所以理论上应该是可能的。派对有点晚了,但我尝试用
文章
作为主题,用评论
作为每个回复。YMMV。
<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>