Skip to content

SEO 修復 Agent|SEO Fix & Content Enable

這份文件包含兩個 Agent 模式:fix-p0(修復 Google 無法正常抓取的技術問題)和 content-enable(讓內容頁可被索引)。兩者都是在 audit 完成後才執行。

完整的 audit / bootstrap / post-deploy 模式請參考 Nuxt SEO Engineering Agent

fix-p0 模式

修復會讓 Google 無法正常抓取、理解、收錄的技術問題。只改 audit 指出的項目,不做無關重構。

P0 問題分類

  • Production site.url 錯誤或混用 www / non-www
  • sitemap index 200,但 child sitemap 無法擷取
  • sitemap route 回 HTML / 404 / 500 / Cloudflare challenge
  • robots production Disallow: /
  • sitemap 包含 noindex 頁、付款頁、會員頁、offline、API
  • 重要公開頁 noindex
  • canonical 指到錯誤網域、錯誤語系、會 redirect 的 URL
  • Nuxt Content 內容頁在 sitemap 中,但直進 SSR 顯示「找不到」
  • PWA offline fallback 攔截公開 SEO 頁

修復優先順序

  1. Canonical domain — 統一 site.urlruntimeConfig.public.siteUrl、fallback
  2. Robots — production 允許公開頁,指向 canonical sitemap
  3. Sitemap accessibility — sitemap index / child sitemap route 200 XML
  4. Sitemap quality — 排除 noindex / private / payment / offline,加入公開 content routes
  5. Indexability contradictions — sitemap URL 不可 noindex,noindex 頁不可進 sitemap
  6. i18n hreflang — 按實際路由產生 alternate,補 x-default 和 locale alias redirects
  7. Nuxt Content direct-entry — 正規化 catch-all slug,尾斜線與無尾斜線都可查到 content
  8. PWA offline fallback/offline noindex/nofollow,公開 SEO 頁加入 navigateFallbackDenylist

Fix-P0 Prompt

Prompt

Nuxt SEO Fix-P0

依 audit 結果修復 Google 無法抓取的問題 Codex

請依照前一份 SEO Audit 報告,按以下順序修復 P0 問題:

  1. 統一 canonical domain(site.url / runtimeConfig / fallback / JSON-LD / OG / sitemap)
  2. 修 robots production 允許抓取,指向 canonical sitemap
  3. 修 sitemap index / child sitemap route 可 200 XML
  4. sitemap 排除 noindex / private / payment / offline / API,加入公開 content routes
  5. 移除 sitemap / noindex 矛盾
  6. 修 i18n hreflang 按實際路由產生,補 x-default 和 locale alias redirects
  7. Nuxt Content slug 正規化,尾斜線 / 無尾斜線都能查到
  8. PWA navigateFallbackDenylist 排除公開 SEO 頁

限制:

  • 只修 audit 指出的 P0 項目,不做無關重構
  • 不改付款、訂閱、webhook、會員資料流程
  • 不把互動主流程硬改 SSR
  • 修完跑 build 驗證

請輸出:

  1. 修改檔案清單與變更摘要
  2. 每個 P0 問題的修復方式
  3. Build / test 結果
  4. Sitemap 修正前後差異
  5. 尚未處理或需要人工操作的項目
  6. 部署後 GSC 操作建議

content-enable 模式

讓內容頁可被搜尋引擎正常索引,進 sitemap,有完整 metadata。

內容頁最低需求

每篇公開內容的 frontmatter 至少要有:

---
title: ""
description: ""
publishedAt: "YYYY-MM-DD"
updatedAt: "YYYY-MM-DD"
seoKeywords: []
ogImage: "/og/path.jpg"
---

建議擴充:

draft: false
private: false
category: ""
series: ""
author: ""

Content-Enable Prompt

Prompt

Nuxt Content SEO Enable

讓內容頁可被搜尋引擎索引 Codex

請讓 Nuxt Content 內容頁可被搜尋引擎正常索引。

請檢查:

  1. content.config.ts 的 collections 定義
  2. 公開內容路由(如 /cards/, /learn/, /guide/, /blog/
  3. 列表頁與詳情頁是否都可 SSR
  4. 詳情頁是否用 content frontmatter 設定 title / description / canonical / OG
  5. sitemap source 是否會讀 content collection
  6. draft / private / disabled 是否被正確過濾
  7. lastmod 是否帶入 updatedAt / publishedAt
  8. 直接貼 URL 進入時,raw HTML 是否有主要內容

請輸出:

  1. 修改檔案清單
  2. 內容欄位待補清單(哪些檔案缺哪些 frontmatter)
  3. 可優先建立的內容方向
  4. 內部連結建議
  5. 驗證結果

修復後驗證

Terminal window
cd frontend
npm run build
npm run verify:seo

若本機 build 因 Sentry sourcemap upload 或網路限制失敗,必須說明失敗點、是否已完成 Nuxt client/server/prerender、是否和 SEO 修改無關。

完成標準

Checklist

SEO Fix 完成檢查

P0

  • 已依照 audit 報告修復,未做無關重構
  • canonical domain 全站統一
  • sitemap 不含 noindex / private / offline 頁
  • sitemap URL 都回 200,不回 3xx / 4xx
  • robots production 允許抓取
  • build 通過(或已記錄非 SEO 相關失敗原因)
  • 內容頁進 sitemap,draft/private 排除
  • 部署後 GSC 操作清單已列出