課程清單 (Course) 結構化資料

這張插圖顯示課程清單在 Google 搜尋中的顯示方式。插圖中顯示相同網站上以清單格式顯示的 3 種不同課程,可供使用者瀏覽和選取特定課程

使用結構化資料為課程清單加上標記,即可讓有興趣的學生透過 Google 搜尋找到您的課程。您可以提供課程的名稱、提供者和簡短說明等詳細資訊。

如何新增結構化資料

結構化資料是一種標準化格式,能夠提供網頁相關資訊並分類網頁內容。如果您是第一次使用結構化資料,請參閱這篇文章,進一步瞭解結構化資料的運作方式。

以下簡要說明如何建立、測試及發布結構化資料。

  1. 新增必要屬性。根據您使用的格式,瞭解要在網頁中的什麼位置插入結構化資料
  2. 遵循指南規範
  3. 使用複合式搜尋結果測試驗證程式碼,並修正所有重大錯誤。此外,我們也建議您修正工具中可能標記的任何非重大問題,因為這有助於改善結構化資料的品質 (但並非符合複合式搜尋結果的顯示條件)。
  4. 部署幾個包含結構化資料的網頁,並使用網址檢查工具測試 Google 轉譯網頁的情形。請確認 Google 可以存取您的網頁,且網頁並未遭到 robots.txt 檔案或 noindex 標記封鎖,也未設有登入規定。如果網頁看起來沒問題,您可以要求 Google 重新檢索您的網址
  5. 為了讓 Google 掌握日後的異動內容,建議您提交 Sitemap。您可以使用 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 美元!」
  • 使用非課程內容做為標題,例如:「參加這門課程就能快速賺取收入!」
  • 提供折扣或購買機會,例如:「各領域的專家分享獨門祕訣;可享 75 折優惠!」

結構化資料類型定義

您的內容必須包含必要的屬性,才能以複合式搜尋結果的形式呈現。 您也可以加入建議的屬性,新增更多內容相關資訊,提供使用者更優質的體驗。

Course

請使用下列屬性來標記至少三門課程。這些課程可以分別放在獨立的詳細資料頁面,也可以放在同一個全包式網頁中。

schema.org/Course 內提供 Course 的完整定義。 Google 支援的屬性如下:

必要屬性
description

Text

課程說明,顯示長度上限為 60 個字元。

name

Text

課程的標題。

建議屬性
provider

Organization

發布課程來源內容的機構。例如:加州大學柏克萊分校。

ItemList

除了 Course 屬性之外,請再新增下列屬性來指定清單。您可以將這些屬性新增至摘要頁面全包式網頁

schema.org/ItemList 內提供 ItemList 的完整定義。

必要屬性
itemListElement

ListItem

單一項目頁面的註解。

ListItem.position

Integer

項目頁面在清單中的序數位置。

ListItem.url

URL

項目頁面的標準網址。每個項目都必須有一個專屬網址。

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.