Which schema.org type should be used for a forum? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this questionNeither Article or Blog seems to fit for a forum with topics an开发者_Python百科d discussions. Or is Article considered for any generic post or comment?
I use Article for the topics and ItemList for the list of topics in forum according to this message.
https://schema.org/DiscussionForumPosting seems to be the recommended solution from schema.org where they say it's for:
A posting to a discussion forum.
They even provide a JSON_LD sample:
<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
},
}
Stackoverflow itself uses QAPage for the HTML element, Question for question element Answer for Answer elements. Example:
<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>
For more detail, you can inspect the source of available forums on the internet. And also, You can validate your structured data by Structured data testing tool.
JSON-LD is the recommended solution for schema so I am looking for some real world examples. On the Schema website it gives a description for DiscussionForumPosting: A posting to a discussion forum.
This seems to indicate that each post in a topic should have structured data (which makes sense to me).
The example they give with the interactionStatistic property seems to indicate this is for the First forum post in a topic.
Forums are made up of categories (usually) and categories are made up of topics, and topics have 1 or more form posts each.
With DiscussionForumPosting how do we handle topics with multiple posts. Large Forum topics can have many pages and 100 plus posts
精彩评论