文章 (ArticleNewsArticleBlogPosting) 結構化資料

在您的新聞、網誌與運動報導網頁中加入 Article 結構化資料,有助於 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 掌握日後的異動內容,建議您提交 Sitemap。您可以使用 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 能否存取您的網址,請使用網址檢查工具
  • 圖片內容與您標記的內容必須相符。
  • 圖片檔案必須使用 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.