文章(ArticleNewsArticleBlogPosting)结构化数据

Article 结构化数据添加到您的新闻、博客和体育报道页面后,Google 就能更深入地了解您的网页,并在 Google 搜索及其他 Google 产品和服务(例如 Google 新闻和 Google 助理)上的搜索结果中为您网页上的文章显示更好的标题文字、图片和日期信息。虽然不需要添加标记即可使用焦点新闻等 Google 新闻功能,但您可以添加 Article 以便更明确地告知 Google 您的内容的要旨(例如,它是新闻报道、作者是谁或文章标题是什么)。

文章富媒体搜索结果

示例

下面是一个包含 Article 结构化数据的网页示例。

JSON-LD


<html>
  <head>
    <title>Title of a News Article</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "NewsArticle",
      "headline": "Title of a News Article",
      "image": [
        "https://example.com/photos/1x1/photo.jpg",
        "https://example.com/photos/4x3/photo.jpg",
        "https://example.com/photos/16x9/photo.jpg"
       ],
      "datePublished": "2024-01-05T08:00:00+08:00",
      "dateModified": "2024-02-05T09:20:00+08:00",
      "author": [{
          "@type": "Person",
          "name": "Jane Doe",
          "url": "https://example.com/profile/janedoe123"
        },{
          "@type": "Person",
          "name": "John Doe",
          "url": "https://example.com/profile/johndoe123"
      }]
    }
    </script>
  </head>
  <body>
  </body>
</html>

微数据


<html>
  <head>
    <title>Title of a News Article</title>
  </head>
  <body>
    <div itemscope itemtype="https://schema.org/NewsArticle">
      <div itemprop="headline">Title of News Article</div>
      <meta itemprop="image" content="https://example.com/photos/1x1/photo.jpg" />
      <meta itemprop="image" content="https://example.com/photos/4x3/photo.jpg" />
      <img itemprop="image" src="https://example.com/photos/16x9/photo.jpg" />
      <div>
        <span itemprop="datePublished" content="2024-01-05T08:00:00+08:00">
          January 5, 2024 at 8:00am
        </span>
        (last modified
        <span itemprop="dateModified" content="2024-02-05T09:20:00+08:00">
          February 5, 2024 at 9:20am
        </span>
        )
      </div>
      <div>
        by
        <span itemprop="author" itemscope itemtype="https://schema.org/Person">
          <a itemprop="url" href="https://example.com/profile/janedoe123">
            <span itemprop="name">Jane Doe</span>
          </a>
        </span>
        and
        <span itemprop="author" itemscope itemtype="https://schema.org/Person">
          <a itemprop="url" href="https://example.com/profile/johndoe123">
            <span itemprop="name">John Doe</span>
          </a>
        </span>
      </div>
    </div>
  </body>
</html>

如何添加结构化数据

结构化数据是一种提供网页相关信息并对网页内容进行分类的标准化格式。如果您不熟悉结构化数据,可以详细了解结构化数据的运作方式

下面概述了如何构建、测试和发布结构化数据。

  1. 添加尽可能多的适用于您网页的建议属性。没有必需添加的属性,根据您的内容按需添加即可。 根据您使用的格式,了解在网页上的什么位置插入结构化数据
  2. 遵循指南
  3. 使用富媒体搜索结果测试验证您的代码,并修复所有严重错误。此外,您还可以考虑修正该工具中可能会标记的任何非严重问题,因为这些这样有助于提升结构化数据的质量(不过,要使内容能够显示为富媒体搜索结果,并非必须这么做)。
  4. 部署一些包含您的结构化数据的网页,然后使用网址检查工具测试 Google 看到的网页样貌。请确保您的网页可供 Google 访问,不会因 robots.txt 文件、noindex 标记或登录要求而被屏蔽。如果网页看起来没有问题,您可以请求 Google 重新抓取您的网址
  5. 为了让 Google 随时了解日后发生的更改,我们建议您提交站点地图Search Console Sitemap API 可以帮助您自动执行此操作。

指南

要使您的结构化数据能够显示在 Google 搜索结果中,您必须遵循以下指南。

技术指南

  • 对于分为多个部分的文章,请确保 rel=canonical 指向每一个网页或“查看全部”网页(而不是指向某个由多部分构成的系列中的第 1 页)。详细了解规范化
  • 如果您将网站内容设为基于订阅的访问模式,或者如果用户必须注册才能访问您的内容,建议您为订阅和付费内容添加结构化数据。

结构化数据类型定义

为了帮助 Google 更好地了解您的网页,请添加尽可能多的适用于该网页的建议属性。没有必需添加的属性,根据您的内容按需添加即可。

Article 对象

Article 对象必须基于以下 schema.org 类型之一:ArticleNewsArticleBlogPosting

Google 支持的属性如下:

建议属性
author

PersonOrganization

文章的作者。为了帮助 Google 更好地了解各种功能中的作者,建议您遵循作者标记最佳实践

author.name

Text

作者的名字。

author.url

URL

可唯一标识文章作者的网页链接。例如作者的社交媒体页面、“关于我”页面或个人简介页面。

如果该网址是内部个人资料页面,我们建议您使用个人资料页面结构化数据标记该作者。

dateModified

DateTime

文章的最近修改日期和时间,采用 ISO 8601 格式。 我们建议您提供时区信息;否则,我们会默认采用 Googlebot 使用的时区

如果要向 Google 提供更准确的日期信息,请添加 dateModified 属性。 富媒体搜索结果测试不会显示有关此属性的警告,因为它只是建议的属性,需要您斟酌是否适用于您的网站。

datePublished

DateTime

文章的首次发布日期和时间,采用 ISO 8601 格式。我们建议您提供时区信息;否则,我们会默认采用 Googlebot 使用的时区

如果要向 Google 提供更准确的日期信息,请添加 datePublished 属性。 富媒体搜索结果测试不会显示有关此属性的警告,因为它只是建议的属性,需要您斟酌是否适用于您的网站。

headline

Text

文章的标题。建议使用简洁的标题,因为长标题在某些设备上可能会被截断。

image

重复的 ImageObjectURL

指向代表文章的图片的网址。请使用与文章相关的图片,而不是徽标或图片说明。

其他的图片指南:

  • 图片网址必须可抓取且可编入索引。如需检查 Google 能否访问您的网址,请使用网址检查工具
  • 图片必须代表标记的内容。
  • 图片必须采用受 Google 图片支持的文件格式。
  • 为取得最佳效果,建议您提供具有以下宽高比的多个高分辨率图片(宽度乘以高度至少为 50K 像素):16x9、4x3 和 1x1。

例如:

"image": [
  "https://example.com/photos/1x1/photo.jpg",
  "https://example.com/photos/4x3/photo.jpg",
  "https://example.com/photos/16x9/photo.jpg"
]

作者标记最佳实践

为了帮助 Google 更好地了解和代表内容的作者,我们建议您在标记中指定作者时遵循以下最佳实践:

作者标记的最佳实践

在标记中添加所有作者

确保以作者身份显示在网页上的所有作者均包含在标记中。

指定多位作者

指定多位作者时,请在各自的 author 字段中列出每位作者:

"author": [
  {"name": "Willow Lane"},
  {"name": "Regula Felix"}
]

请勿在同一 author 字段中合并多位作者:

"author": {
  "name": "Willow Lane, Regula Felix"
}

使用其他字段

为了帮助 Google 更好地了解作者是谁,强烈建议您使用 typeurl(或 sameAs)属性。为 urlsameAs 属性使用有效的网址。

例如,如果作者是个人,您可以链接到作者的网页(其中提供了有关该作者的详细信息):

"author": [
  {
    "@type": "Person",
    "name": "Willow Lane",
    "url": "https://www.example.com/staff/willow_lane"
  }
]

如果作者为组织,您可以链接到该组织的首页。

"author":
  [
    {
      "@type":"Organization",
      "name": "Some News Agency",
      "url": "https://www.example.com/"
  }
]

请仅在 author.name 属性中指定作者的名字

author.name 属性中,仅指定作者的名字。请勿添加任何其他信息。更具体地说,请勿添加以下信息:

  • 发布商的名称。请改用 publisher 属性。
  • 作者的工作职位。如果您想指定该信息,请使用相应的属性 (jobTitle)。
  • 前缀或后缀敬称。如果您要指定该信息,请使用相应的属性(honorificPrefixhonorificSuffix)。
  • 介绍性字词(例如,不得包含“发布者”等字词)。
"author":
  [
    {
      "name": "Echidna Jones",
      "honorificPrefix": "Dr",
      "jobTitle": "Editor in Chief"
    }
  ],
"publisher":
  [
    {
      "name": "Bugs Daily"
    }
  ]
}

使用适当的 Type

对个人使用 Person 类型,对组织使用 Organization 类型。不要使用 Thing 类型,也不要使用错误类型(例如,对某人使用 Organization 类型)。

下面的示例应用了作者标记最佳实践:

"author":
  [
    {
      "@type": "Person",
      "name": "Willow Lane",
      "jobTitle": "Journalist",
      "url": "https://www.example.com/staff/willow-lane"
    },
    {
      "@type": "Person",
      "name": "Echidna Jones",
      "jobTitle": "Editor in Chief",
      "url": "https://www.example.com/staff/echidna-jones"
    }
  ],
"publisher":
  {
    "name": "The Daily Bug",
    "url": "https://www.example.com"
  },
  // + Other fields related to the article...
}

Troubleshooting

If you're having trouble implementing or debugging structured data, here are some resources that may help you.

  • If you're using a content management system (CMS) or someone else is taking care of your site, ask them to help you. Make sure to forward any Search Console message that details the issue to them.
  • Google does not guarantee that features that consume structured data will show up in search results. For a list of common reasons why Google may not show your content in a rich result, see the General Structured Data Guidelines.
  • You might have an error in your structured data. Check the list of structured data errors and the Unparsable structured data report.
  • If you received a structured data manual action against your page, the structured data on the page will be ignored (although the page can still appear in Google Search results). To fix structured data issues, use the Manual Actions report.
  • Review the guidelines again to identify if your content isn't compliant with the guidelines. The problem can be caused by either spammy content or spammy markup usage. However, the issue may not be a syntax issue, and so the Rich Results Test won't be able to identify these issues.
  • Troubleshoot missing rich results / drop in total rich results.
  • Allow time for re-crawling and re-indexing. Remember that it may take several days after publishing a page for Google to find and crawl it. For general questions about crawling and indexing, check the Google Search crawling and indexing FAQ.
  • Post a question in the Google Search Central forum.