文章(Article
、NewsArticle
、BlogPosting
)结构化数据
将 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>
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.
- 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.
- Follow the guidelines.
- 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).
- 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. - 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 类型之一:Article
、NewsArticle
和 BlogPosting
。
Google 支持的属性如下:
建议属性 | |
---|---|
author |
文章的作者。为了帮助 Google 更好地了解各种功能中的作者,建议您遵循作者标记最佳实践。 |
author.name |
作者的名字。 |
author.url |
可唯一标识文章作者的网页链接。例如作者的社交媒体页面、“关于我”页面或个人简介页面。 如果该网址是内部个人资料页面,我们建议您使用个人资料页面结构化数据标记该作者。 |
dateModified |
文章的最近修改日期和时间,采用 ISO 8601 格式。 我们建议您提供时区信息;否则,我们会默认采用 Googlebot 使用的时区。 如果要向 Google 提供更准确的日期信息,请添加 |
datePublished |
文章的首次发布日期和时间,采用 ISO 8601 格式。我们建议您提供时区信息;否则,我们会默认采用 Googlebot 使用的时区。 如果要向 Google 提供更准确的日期信息,请添加 |
headline |
文章的标题。建议使用简洁的标题,因为长标题在某些设备上可能会被截断。 |
image |
重复的 指向代表文章的图片的网址。请使用与文章相关的图片,而不是徽标或图片说明。 其他的图片指南:
例如: "image": [ "https://example.com/photos/1x1/photo.jpg", "https://example.com/photos/4x3/photo.jpg", "https://example.com/photos/16x9/photo.jpg" ] |
作者标记最佳实践
为了帮助 Google 更好地了解和代表内容的作者,我们建议您在标记中指定作者时遵循以下最佳实践:
作者标记的最佳实践 | |
---|---|
在标记中添加所有作者 |
确保以作者身份显示在网页上的所有作者均包含在标记中。 |
指定多位作者 |
指定多位作者时,请在各自的 "author": [ {"name": "Willow Lane"}, {"name": "Regula Felix"} ]
请勿在同一 "author": { "name": "Willow Lane, Regula Felix" } |
使用其他字段 |
为了帮助 Google 更好地了解作者是谁,强烈建议您使用 例如,如果作者是个人,您可以链接到作者的网页(其中提供了有关该作者的详细信息): "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": [ { "@type": "Person", "name": "Echidna Jones", "honorificPrefix": "Dr", "jobTitle": "Editor in Chief" } ], "publisher": [ { "@type": "Organization", "name": "Bugs Daily" } ] } |
使用适当的 |
对个人使用 |
下面的示例应用了作者标记最佳实践:
"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": { "@type": "Organization", "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.