文章(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": "2015-02-05T08:00:00+08:00",
      "dateModified": "2015-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="2015-02-05T08:00:00+08:00">
          February 5, 2015 at 8:00am
        </span>
        (last modified
        <span itemprop="dateModified" content="2015-02-05T09:20:00+08:00">
          February 5, 2015 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>

How to add structured data

Structured data is a standardized format for providing information about a page and classifying the page content. If you're new to structured data, you can learn more about how structured data works.

Here's an overview of how to build, test, and release structured data.

  1. Add as many recommended properties that apply to your web page. There are no required properties; instead, add the properties that apply to your content. Based on the format you're using, learn where to insert structured data on the page.
  2. Follow the guidelines.
  3. Validate your code using the Rich Results Test and fix any critical errors. Consider also fixing any non-critical issues that may be flagged in the tool, as they can help improve the quality of your structured data (however, this isn't necessary to be eligible for rich results).
  4. Deploy a few pages that include your structured data and use the URL Inspection tool to test how Google sees the page. Be sure that your page is accessible to Google and not blocked by a robots.txt file, the noindex tag, or login requirements. If the page looks okay, you can ask Google to recrawl your URLs.
  5. To keep Google informed of future changes, we recommend that you submit a sitemap. You can automate this with the 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...
}

问题排查

如果您在实施或调试结构化数据时遇到问题,请查看下面列出的一些实用资源。

  • 如果您使用了内容管理系统 (CMS) 或其他人负责管理您的网站,请向其寻求帮助。请务必向其转发列明问题细节的任何 Search Console 消息。
  • Google 不能保证使用结构化数据的功能一定会显示在搜索结果中。如需查看导致 Google 无法将您的内容显示为富媒体搜索结果的各种常见原因,请参阅结构化数据常规指南
  • 您的结构化数据可能存在错误。请参阅结构化数据错误列表
  • 如果您的网页受到结构化数据手动操作的影响,其中的结构化数据将会被忽略(但该网页仍可能会出现在 Google 搜索结果中)。如需修正结构化数据问题,请使用“人工处置措施”报告
  • 再次查看相关指南,确认您的内容是否未遵循指南。问题可能是因为出现垃圾内容或使用垃圾标记导致的。不过,问题可能不是语法问题,因此富媒体搜索结果测试无法识别这些问题。
  • 针对富媒体搜索结果缺失/富媒体搜索结果总数下降进行问题排查
  • 请等待一段时间,以便 Google 重新抓取您的网页并重新将其编入索引。请注意,网页发布后,Google 可能需要几天时间才会找到和抓取该网页。有关抓取和索引编制的常见问题,请参阅 Google 搜索抓取和索引编制常见问题解答
  • Google 搜索中心论坛中发帖提问。