我正在尝试做一个BlogPosting架构标记。我不知道它有什么问题

时间:2016-07-01 16:23:03

标签: json seo json-ld

为什么谷歌的结构化数据测试工具没有选择这个json-ld标记?我不确定语法错误在哪里。

   <script type="application/ld+json">
{ "@context": "http://schema.org", 
 "@type": "BlogPosting",
 "headline": "Brain and Head Injury after Cycling Accident",
 "image": "https://www.utahadvocates.com/wp-content/uploads/2016/06/Traumaticbraininjury2010-1.jpg",
  "logo": "https://www.utahadvocates.com/wp-content/uploads/2015/10/final_advocates_logo-compressed.png",
 "editor": "Jen Carrigan", 
 "genre": "Personal Injury", 
 "keywords": "Brain Injury, Personal Injury, Cycling Accident ", 
 "publisher": "The Advocates",
 "url": "https://www.utahadvocates.com",
 "datePublished": "2016-06-30",
 "dateCreated": "2016-06-30",
 "dateModified": "2015-09-20",
 "description": "Head and brain injuries can occur when you are in a cycling accident. Studies show that these types of injuries can lead to much slower reaction times. ",
 "articleBody": "Brain and head injuries occur after cycling accidents overwhelmingly in cases where the cyclist was not wearing a helmet at the time of the collision. In addition, brain injuries occur significantly more when the cyclist was hit by a motor vehicle as opposed to any other type of cycling accident. The symptoms from these types of brain and head injuries can last significantly longer than you would think. Let’s take a look at some of these symptoms below.",

   "author": {
    "@type": "Person",
    "name": "Jen Carrigan "
             }
 }
</script>

1 个答案:

答案 0 :(得分:1)

您共享的标记代码段几乎没有问题。

  1. 图片属性 - schema.org/BlogPosting图片允许ImageObjectURL,但Google仅允许ImageObject
  2. 徽标属性 - 徽标属性是Publisher的子项,而不是BlogPosting的子项。因此,请使用类型为Organization的对象作为发布商属性。
  3. 添加mainEntityOfPage,这是必需的。
  4. 见下文 -

    <script type="application/ld+json">{  
       "@context":"http://schema.org",
       "@type":"BlogPosting",
       "headline":"Brain and Head Injury after Cycling Accident",
       "image":{  
          "@type":"ImageObject",
          "url":"https://www.utahadvocates.com/wp-content/uploads/2016/06/Traumaticbraininjury2010-1.jpg",
          "height":2260,
          "width":2841
       },
       "editor":"Jen Carrigan",
       "genre":"Personal Injury",
       "keywords":"Brain Injury, Personal Injury, Cycling Accident ",
       "publisher":{  
          "@type":"Organization",
          "name":"The Advocates",
          "logo":{  
             "@type":"ImageObject",
             "url":"https://www.utahadvocates.com/wp-content/uploads/2015/10/final_advocates_logo-compressed.png",
             "width":300,
             "height":60
          }
       },
       "url":"https://www.utahadvocates.com",
       "datePublished":"2016-06-30",
       "dateCreated":"2016-06-30",
       "dateModified":"2015-09-20",
       "description":"Head and brain injuries can occur when you are in a cycling accident. Studies show that these types of injuries can lead to much slower reaction times. ",
       "articleBody":"Brain and head injuries occur after cycling accidents overwhelmingly in cases where the cyclist was not wearing a helmet at the time of the collision. In addition, brain injuries occur significantly more when the cyclist was hit by a motor vehicle as opposed to any other type of cycling accident. The symptoms from these types of brain and head injuries can last significantly longer than you would think. Let’s take a look at some of these symptoms below.",
       "author":{  
          "@type":"Person",
          "name":"Jen Carrigan "
       },
       "mainEntityOfPage":{  
          "@type":"WebPage",
          "@id":"https://www.utahadvocates.com/"
       }
    }</script>