html 常见问题(FAQ)页面Schema.org JSON-LD格式

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html 常见问题(FAQ)页面Schema.org JSON-LD格式相关的知识,希望对你有一定的参考价值。

<!--When a JSON-LD document's top-level structure is an object that contains no other 
properties than @graph and optionally @context (properties that are not mapped to an IRI 
or a keyword are ignored), @graph is considered to express the otherwise implicit default graph. 
This mechanism can be useful when a number of nodes exist at the document's top level that 
share the same context, which is, e.g., the case when a document is flattened. The @graph 
keyword collects such nodes in an array and allows the use of a shared context. 

From https://www.w3.org/TR/json-ld/#h3_named-graphs 

More on graph - http://stackoverflow.com/questions/30505796/json-ld-schema-org-multiple-video-image-page/30506476#30506476
-->

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@graph": [
{
    "@type": "Question",
    "text": "What is a cat?",
    "dateCreated": "2010-11-04T20:07Z",
    "acceptedAnswer": {
        "@type": "Answer",
        "text": "(The text of the accepted answer goes here...).",
        "dateCreated": "2010-12-01T22:01Z"
    }
},
{
    "@type": "Question",
    "text": "What is a dog?",
    "dateCreated": "2010-11-04T20:07Z",
    "acceptedAnswer": {
        "@type": "Answer",
        "text": "(The text of the accepted answer goes here...).",
        "dateCreated": "2010-12-01T22:01Z"
    }
}
]
}
</script>

以上是关于html 常见问题(FAQ)页面Schema.org JSON-LD格式的主要内容,如果未能解决你的问题,请参考以下文章