课程列表 (Course) 结构化数据

课程列表在 Google 搜索结果中的显示效果图示。它以列表形式显示同一网站中的 3 门不同课程,用户可以浏览列表并选择特定课程

借助课程列表结构化数据,您可以提供有关您的课程的更多信息,以便潜在学生通过 Google 搜索找到您的课程。您可以提供详细信息,包括课程名称、提供者和简短说明。

以下介绍两项课程富媒体搜索结果功能,它们使用了相同的 schema.org Course 类型。如果您的网站提供课程相关信息,您便可以按照以下两个实现指南来使用这两项功能:

  • 课程列表:一种富媒体搜索结果,会列出来自同一网站上的课程。
  • 课程信息:一个轮播界面,会显示来自多个网站的详细课程信息。

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 the required properties. 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.

示例

课程详情单一页面

下面是一个课程详情单一页面的示例。此页面必须与包含 ItemList 标记摘要页面配对。


<html>
  <head>
    <title>Introduction to Computer Science and Programming</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "Course",
      "name": "Introduction to Computer Science and Programming",
      "description": "Introductory CS course laying out the basics.",
      "provider": {
        "@type": "Organization",
        "name": "University of Technology - Eureka",
        "sameAs": "https://www.example.com"
      }
    }
    </script>
  </head>
  <body>
  </body>
</html>

全包式单一页面

下面是一个全包式单一页面的示例。 此页面设置在同一页面上包含各门课程的列表标记和详细信息。


<html>
  <head>
    <title>Computer Science Courses</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "ItemList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "item": {
            "@type": "Course",
            "url":"https://www.example.com/courses#intro-to-cs",
            "name": "Introduction to Computer Science and Programming",
            "description": "This is an introductory CS course laying out the basics.",
            "provider": {
              "@type": "Organization",
              "name": "University of Technology - Example",
              "sameAs": "https://www.example.com"
           }
          }
        },
        {
          "@type": "ListItem",
          "position": 2,
          "item": {
            "@type": "Course",
            "url":"https://www.example.com/courses#intermediate-cs",
            "name": "Intermediate Computer Science and Programming",
            "description": "This is a CS course that builds on the basics learned in the Introduction course.",
            "provider": {
              "@type": "Organization",
              "name": "University of Technology - Example",
              "sameAs": "https://www.example.com"
           }
         }
        },
        {
          "@type": "ListItem",
          "position": 3,
          "item": {
            "@type": "Course",
            "url":"https://www.example.com/courses#advanced-cs",
            "name": "Advanced Computer Science and Programming",
            "description": "This CS course covers advanced programming principles.",
            "provider": {
              "@type": "Organization",
              "name": "University of Technology - Eureka",
              "sameAs": "https://www.example.com"
           }
          }
        }
      ]
    }
    </script>
  </head>
  <body>
  </body>
</html>

指南

您的课程必须遵循以下指南,才能出现在课程列表中。

内容指南

  • 仅对符合下述课程定义的教育内容使用 Course 标记:围绕特定主题和/或话题展开,且包含讲座、课程或模块的课程系列或单元。
  • 课程必须围绕特定主题和/或话题展开,在知识和/或技能方面有明确的教育成果,由一位或多位教师讲授并且有学生名单。
  • 诸如“天文日”之类的一般公众活动不是课程,一段 2 分钟的“如何制作三明治”视频也不是课程。

技术指南

您必须至少标记三门课程。这些课程可以位于不同的详情页面中,也可以位于全包式页面中。

您必须将轮播界面标记添加到摘要页面全包式页面

每门课程必须具有有效的 nameprovider 属性。例如,以下命名方式均无效:

  • 推广用语:“世界上最好的学校”
  • 课程标题中包含价格:“学尤克里里 - 只需 30 美元!”
  • 使用非课程内容作为标题,如:“学习这门课程,掌握快速赚钱秘诀!”
  • 折扣或购买机会,如:“各领域的佼佼者分享了他们的秘诀 - 报名听课可享七五折优惠!”

结构化数据类型定义

若要使您的内容能够显示为富媒体搜索结果,您必须为其添加必要属性。 您还可添加建议属性,以便添加与内容相关的更多信息,进而提供更优质的用户体验。

Course

使用以下属性标记至少三个课程。这些课程可以位于不同的详情页面中,也可以位于全包式页面中。

如需了解 Course 的完整定义,请访问 schema.org/Course。Google 支持的属性如下:

必要属性
description

Text

课程的说明。最多显示 60 个字符。

name

Text

课程的标题。

建议的属性
provider

Organization

发布课程来源内容的组织。例如,加州大学伯克利分校。

ItemList

除了 Course 属性之外,还可以添加以下属性来指定课程列表。您可以将这些属性添加到摘要页面全包式页面中。

如需了解 ItemList 的完整定义,请访问 schema.org/ItemList

必要属性
itemListElement

ListItem

单个项目网页的注释。

ListItem.position

Integer

项目网页在列表中的序号位置。

ListItem.url

URL

项目网页的规范网址。每个项目都必须具备一个独一无二的网址。

问题排查

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

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