是否可以在问题标记中列出多个问题并将其链接到一个QAPage
?
当我尝试以下JSON-LD时,Google测试工具会以仅允许一个问题的错误进行响应:
在页面上
Question
上应该恰好有一个QAPage
。
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "QAPage",
"@id": "QAPage1",
"description":"Blabla Blabla Blabla Blabla Blabla Blabla.",
"image":"https://www.example.com/images/blabla.jpg",
"name":"Blabla Blabla.",
"url":"https://www.example.com"
}
</script>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@graph": [
{
"@type": "Question",
"@id": "Question1",
"name": "Is this question 1?",
"upvoteCount": "196",
"text": "Is this question 1?",
"dateCreated": "2010-11-04T20:07Z",
"author": {
"@type": "Person",
"name": "someuser"
},
"answerCount": "4",
"acceptedAnswer": {
"@type": "Answer",
"upvoteCount": "1337",
"url": "https://www.example.com",
"text": "(The text of the accepted answer goes here...).",
"dateCreated": "2010-12-01T22:01Z",
"author": {
"@type": "Person",
"name": "someuser"
}
},
"suggestedAnswer": {
"@type": "Answer",
"upvoteCount": "39",
"url": "https://www.example.com",
"text": "(The text of the accepted answer goes here...).",
"dateCreated": "2010-12-06T21:11Z",
"author": {
"@type": "Person",
"name": "lonelyuser1234"
}
},
"mainEntityOfPage": "QAPage1"
},
{
"@type": "Question",
"@id": "Question2",
"name": "Is this question 2?",
"upvoteCount": "196",
"text": "Is this question 2?",
"dateCreated": "2010-11-04T20:07Z",
"author": {
"@type": "Person",
"name": "someuser"
},
"answerCount": "4",
"acceptedAnswer": {
"@type": "Answer",
"upvoteCount": "1337",
"url": "https://www.example.com",
"text": "(The text of the accepted answer goes here...).",
"dateCreated": "2010-12-01T22:01Z",
"author": {
"@type": "Person",
"name": "someuser"
}
},
"suggestedAnswer": {
"@type": "Answer",
"upvoteCount": "39",
"url": "https://www.example.com",
"text": "(The text of the accepted answer goes here...).",
"dateCreated": "2010-12-06T21:11Z",
"author": {
"@type": "Person",
"name": "lonelyuser1234"
}
},
"mainEntityOfPage": "QAPage1"
}
]
}
</script>
我认为每页允许多个问题是有意义的。就我而言,这是一个FAQ页面,其中有几个问题和答案。有没有人解决了这个问题?
答案 0 :(得分:2)
QAPage
类型的描述:
QAPage是一个专注于特定问题及其答案的网页,例如在问答网站或记录常见问题解答(FAQ)。
这是一个一个问题。如果您在同一页面上有多个问题,则不应使用QAPage
。
有一种FAQPage
类型,但it’s currently in Pending(因此可能会有所变化,请参见discussion about it),目前具有以下说明:
FAQPage是一个呈现一个或多个“常见问题”的网页(另请参见QAPage)。
它看起来像:
{
"@context": "http://schema.org/",
"@type": "FAQPage",
"hasPart": [
{"@type": "Question"},
{"@type": "Question"},
{"@type": "Question"}
]
}
如果您的页面有多个问题,但没有常见问题问题(因此它不是典型的FAQ页面),则不应使用QAPage
或FAQPage
。改为使用其父类型WebPage
(或其子类型CollectionPage
)。