文章 (Article
、NewsArticle
、BlogPosting
) 結構化資料
在您的新聞、網誌與運動報導網頁中加入 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>
如何新增結構化資料
結構化資料是一種標準化格式,能夠提供網頁相關資訊並分類網頁內容。如果您是第一次使用結構化資料,請參閱這篇文章,進一步瞭解結構化資料的運作方式。
以下簡要說明如何建立、測試及發布結構化資料。
- 盡可能加入網頁適用的建議屬性。提醒您,並沒有所謂的必要屬性,因此請改為加入適用於內容的屬性。根據您使用的格式,瞭解要在網頁中的什麼位置插入結構化資料。
- 遵循指南規範。
- 使用複合式搜尋結果測試驗證程式碼,並修正所有重大錯誤。此外,我們也建議您修正工具中可能標記的任何非重大問題,因為這有助於改善結構化資料的品質 (但並非符合複合式搜尋結果的顯示條件)。
- 部署幾個包含結構化資料的網頁,並使用網址檢查工具測試 Google 轉譯網頁的情形。請確認 Google 可以存取您的網頁,且網頁並未遭到 robots.txt 檔案或
noindex
標記封鎖,也未設有登入規定。如果網頁看起來沒問題,您可以要求 Google 重新檢索您的網址。 - 為了讓 Google 掌握日後的異動內容,建議您提交 Sitemap。您可以使用 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": [ { "name": "Echidna Jones", "honorificPrefix": "Dr", "jobTitle": "Editor in Chief" } ], "publisher": [ { "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": { "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.