结构化数据显示“属性Publisher.itemtype具有无效值。”

时间:2018-08-12 07:41:27

标签: schema.org json-ld google-rich-snippets

我正在为我的网站文章做结构化数据。为此,我使用的是JSON-LD,它是使用Google标记帮助器制作的,并且还添加了一些属性以消除错误。现在,只有一个错误

  

属性Publisher.itemtype具有无效值。

我的组织也有不同的结构化数据。但是,它也不接受该值。这是我正在使用的文章代码之一

{
"@context" : "http://schema.org",
"@type" : "Article",
"name" : "Registration and Expiration Date in PHP and MySQL",
"image" : "https://i0.wp.com/technopoints.co.in/wp-content/uploads/2018/07/Expiration.jpg?resize=900%2C506&ssl=1",
"articleBody" : "Hey Technoz, In this tutorial we are going to learn how to create automatic registration and expiration date in php ...",
"url" : "https://technopoints.co.in/expiration-date-in-php/",
"author" : "Ashish Joshi",
"datePublished" : "01/07/2018",
"headline" : "Registration and Expiration Date in PHP and MySQL",
"publisher" : "Softglobe Technologies"
}

,以下是组织的makup代码。它没有错误。

{"@context":"https:\/\/schema.org","@type":"Organization","url":"https:\/\/technopoints.co.in\/","sameAs":["https:\/\/www.facebook.com\/technopoints.co.in","https:\/\/plus.google.com\/116699158294208258487"],"@id":"https:\/\/technopoints.co.in\/#organization","name":"Softglobe Technologies","logo":"https:\/\/technopoints.co.in\/wp-content\/uploads\/2017\/12\/iconnew.png"}

1 个答案:

答案 0 :(得分:0)

属性 publisher 的说明告诉我们:

  

值应该是以下类型之一: Organization Person

在标记中,您没有为此属性指定嵌入类型。 如果将组织类型安装为嵌入式,则可以在此类型内部将标记应用于组织。

例如:

{
"@context" : "https://schema.org",
  "@type" : "Article",
  "name" : "Registration and Expiration Date in PHP and MySQL",
  "image" : "https://i0.wp.com/technopoints.co.in/wp-content/uploads/2018/07/Expiration.jpg?resize=900%2C506&ssl=1",
  "mainEntityOfPage":"https://technopoints.co.in/expiration-date-in-php/",
  "speakable":
 {
  "@type": "SpeakableSpecification",
  "xpath": [
    "/html/head/title",
    "/html/head/meta[@name='description']/@content"
    ]
  },
  "author" :{
    "@type": "Person",
      "name":"Ashish Joshi",
      "alumniOf":"An organization that the person is an alumni of",
      "award":"An award won by or for this item",
      "memberOf":"An Organization (or ProgramMembership) to which this Person or Organization belongs",
      "email":"zzz@hhhrr.com",
      "honorificSuffix":"An honorific suffix preceding a Person's name such as M.D. /PhD/MSCSW",
      "knowsAbout":"Of a Person, and less typically of an Organization, to indicate a topic that is known about - suggesting possible expertise but not implying it",
      "sameAs":[
       "https:\/\/plus.google.com\/0000",
       "https:\/\/facebook.com\/0000",
       "https:\/\/twitter.com\/0000"
      ]
    },
  "datePublished" : "01/07/2018",
  "dateModified":"10/08/2018",
  "headline" : "Registration and Expiration Date in PHP and MySQL",
  "publisher" : {
    "@type": "Organization",
      "name":"Softglobe Technologies",
      "url":"https:\/\/technopoints.co.in",
      "logo":{
            "@type":"ImageObject",
             "url":"https://technopoints.co.in/images/logo.jpg",
             "contentUrl":"https://technopoints.co.in/images/logo.jpg",
             "width":"300",
             "height":"100"
              },
      "sameAs":"https:\/\/plus.google.com\/116699158294208258487"
     }
}

请注意我在此标记中的以下更改:

  • 删除了属性 articleBody ,因为该属性复制了文章的全部内容,降低了下载速度,并且Google不支持此属性。

  • 根据Google对Article的建议,添加了属性 mainEntityOfPage

  • 根据Google的建议添加了“ 可说”属性。此属性将帮助漫游器确定对语音搜索有用的内容。在此特定标记中,指定了一个路径,用于从网页的元标题和元描述中获取信息。但是,仅新闻网站支持此属性。因此,如果您的网站不是新闻,则将其删除。请注意,在语音内容中,不应包含日期,并且对于语音发布而言可能不易理解的其他符号和元素。详细了解 Guide of Google to speakable

  • 具有嵌入类型Person的属性作者的更完整标记。这将有助于建立有关负责人的信息,这些信息可以标识为您的金钱或您的生活:YMYL 。这可以符合 Google的搜索质量评级者指南专业知识,权威性,可信赖性:EAT 的要求。

  • 将根据Google建议修改的属性dateModified添加到Article。

  • 当然,已添加并更正了属性发布者的标记。

详细了解 Guide of Google to Article