Schema piece - Comment
Describes a review. Usually in the context of an Article or a WebPage.
Triggers
Should be added as top-level nodes in the graph, as/when required by other nodes. E.g., when an Article has comments.
Required properties
A valid Comment must have the following properties.
@type:Comment.@id: The site's home URL appended by#/schema/Comment/{{ID}}, where{{ID}}is a unique identifier for the comment in question.about: A reference by ID to the parentArticle(orWebPage, when no Article ispresent).text: The textual content of the comment, stripping HTML tags.author: A reference by ID to thePersonwho wrote the comment.
Failure scenarios
If any of the required fields are missing or invalid, the node should not be output.
Optional properties
The following should be added whenever available and valid:
url: The unmodified canonical URL of the parentWebPage, appended by#comment-{{NUM}}, where{{NUM}}is the database ID of the comment.
Examples
Minimum criteria
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Comment",
"@id": "https://www.example.com/#/schema/Comment/abc123",
"about": {
"@id": "https://www.example.com/blog/example-article/"
},
"text": "Example comment content",
"author": {
"@id": "https://www.example.com/#/schema/Person/abc123"
}
}
]
}