代码之家  ›  专栏  ›  技术社区  ›  Tom Smykowski

谷歌控制台上没有显示文章丰富的卡片数据

  •  0
  • Tom Smykowski  · 技术社区  · 8 年前

    NewsArticle 公司博客上的富卡数据如下:

    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "ItemList",
      "itemListElement": [
            {
              "@type": "ListItem",
              "position": "1",
              "item": {
                "@type": "Article",
                "headline": "Jak dodać menadżera do kanału YouTube?",
                "image": {
                    "@type": "ImageObject",
                    "url": "https://websoul.pl/blog/wp-content/uploads/2017/07/youtube_1500966468-728x728.png",
                    "height": 728,
                    "width": 728
                  },
                "datePublished": "2017-07-25T08:08:24+00:00",
                "dateModified": "2017-08-11T08:40:52+00:00",
                "author": {
                    "@type": "Person",
                    "name": "Tomasz Smykowski"
                  },
                "publisher": {
                    "@type": "Organization",
                    "name": "Websoul",
                    "logo": {
                      "@type": "ImageObject",
                      "url": "https://websoul.pl/richpublishericon60x600.png",
                      "width": 600,
                      "height": 60
                      }
                    },
                "description": "Jak dodać menadżera do kanału na YouTube? O tym jak dać innej osobie dostęp do kanału dowiesz się z tego artykułu. Czytaj dalej&#8230;",
                "url": "https://websoul.pl/blog/jak-dodac-menadzera-do-kanalu-youtube",  
                "name": "Jak dodać menadżera do kanału YouTube?"
                }
              }
            ,{
              "@type": "ListItem",
              "position": "1",
              "item": {
                "@type": "Article",
                "headline": "Jak zaakceptować dostęp do konta Facebook Ads i Google Adwords",
                "image": {
                    "@type": "ImageObject",
                    "url": "https://websoul.pl/blog/wp-conten.....
    

    我用Google validator验证了它,但我有一个错误: https://search.google.com/structured-data/testing-tool?hl=pl#url=https%3A%2F%2Fwebsoul.pl%2Fblog%2F

    声明所有URL应指向同一页面。但正如我所看到的,实际上所有的URL都指向同一个页面。

    我已经将网站提交到谷歌索引。我知道它是索引的,因为我也实现了AMP,它现在正在工作。

    1 回复  |  直到 8 年前
        1
  •  1
  •   Jack Tonzing    8 年前

    如果您试图获得旋转木马富卡,那么您所定义的内容存在一些问题。

    第一个问题是,您的页面是一个摘要页面,带有指向文章的链接。您需要按此处所述定义它们 https://developers.google.com/search/docs/guides/mark-up-listings 摘要页面+多个完整详细信息页面

    在摘要页面上,您需要将结构化数据定义为简化的项目列表。确保增加每个项目的位置。

    <script type="application/ld+json">
    {
      "@context":"http://schema.org",
      "@type":"ItemList",
      "itemListElement":[
        {
          "@type":"ListItem",
          "position":1,
          "url":"http://example.com/desserts/apple-pie"
        },
        {
          "@type":"ListItem",
          "position":2,
          "url":"http://example.com/desserts/cherry-pie"
        },
        {
          "@type":"ListItem",
          "position":3,
          "url":"http://example.com/desserts/blueberry-pie"
        }
      ]
    }
    </script>
    

    在链接的文章页面上,您需要将结构化数据定义为文章。

    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "Article",
      "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://google.com/article"
      },
      "headline": "Article headline",
      "image": {
        "@type": "ImageObject",
        "url": "https://google.com/thumbnail1.jpg",
        "height": 800,
        "width": 800
      },
      "datePublished": "2015-02-05T08:00:00+08:00",
      "dateModified": "2015-02-05T09:20:00+08:00",
      "author": {
        "@type": "Person",
        "name": "John Doe"
      },
       "publisher": {
        "@type": "Organization",
        "name": "Google",
        "logo": {
          "@type": "ImageObject",
          "url": "https://google.com/logo.jpg",
          "width": 600,
          "height": 60
        }
      },
      "description": "A most wonderful article"
    }
    </script>