组合或单独使用Schema.org的“ WebSite”和“ Article”

时间:2019-06-10 11:51:16

标签: schema.org json-ld

什么是好的,将WebSiteArticle结合使用还是单独使用?

例如:

example.com(家庭)的模式:

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "WebSite",
  "name": "",
  "url": "",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "{search_term_string}",
    "query-input": "required name=search_term_string"
  }
}
</script>

一个帖子example.com/example-post/的架构(文章):

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "",
  "image": {
    "@type": "ImageObject",
    "url": "",
    "width": ,
    "height": 
  }
</script>

现在我的问题是,在文章(example.com/example-post/)中,我必须单独放置架构(如上所述),或者将其与WebSite组合在一起,如下所示:

<script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "WebSite",
      "name": "",
      "url": "",
      "potentialAction": {
        "@type": "SearchAction",
        "target": "{search_term_string}",
        "query-input": "required name=search_term_string"
      }
    },
    {
      "@context": "https://schema.org",
      "@type": "Article",
      "headline": "",
      "image": {
        "@type": "ImageObject",
        "url": "",
        "width": ,
        "height": 
      }
</script>

0 个答案:

没有答案