Community寫作與編輯github.com

umairmsm/wp-seo

WordPress 網站建置套件第五階段:SEO 與多語言支援。涵蓋標題與描述、標準網址、JSON-LD 結構化資料、sitemap、robots.txt、llms.txt、重新導向、舊網址對應、Search Console 以及透過 Polylang 逐步新增語言。

wp-seo 是什麼?

此技能為 WordPress 網站建置流程的第五階段,專注於 SEO 最佳化與多語言支援。它指導如何設定單一結構化資料擁有者、確保每頁通過嚴格的 SEO 測試(標題長度、描述、標準網址、H1 標籤等),並建立正確的 robots.txt、sitemap 與 llms.txt。同時,它提供完整的重新導向策略(301 與 302)與舊網址對應,並整合 Search Console 與 Bing 網站管理員工具。多語言部分則透過 Polylang 逐步導入,每個新語言皆需經過母語審查,且在正式上線前僅以 302 臨時重新導向至原始語言,不公開於 sitemap 或選單中。支援平台為 WordPress 專案,主要用於確保搜尋引擎與 AI 爬蟲能正確理解網站內容。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/umairmsm/wp-site-kit/tree/HEAD/skills/wp-seo

Installed? Explore more 寫作與編輯 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

第五階段:SEO 與語言

目標:搜尋引擎與 AI 輔助工具能理解每個頁面。舊網址能正確導向。每個額外語言的正確性與原始語言相同。

SEO 步驟

  1. 每個工作只有一個擁有者。
    • SEO 外掛(預設為 Rank Math)負責標題、Meta、Sitemap 與主要結構化資料圖表。
    • 核心的 schema.php 將網站自身類型加入該圖表。
    • 停用任何會輸出自身結構化資料的領域外掛,確保只有一個圖表,避免衝突。
  2. tests/helpers/site.ts 中的每個頁面需通過 npm run test:seo:
    • 標題 10–65 個字元;
    • 描述 50–160 個字元;
    • 絕對標準網址;
    • 一個 H1;
    • lang 屬性;
    • 零個 Google Fonts 請求。 檢查清單與寫作規則:references/seo-checklist.md。
  3. 結構化資料:
    • Organization(或 LocalBusiness)僅出現一次。
    • 每個頁面對應的項目類型(Service、Product、TouristTrip、Course 等)。
    • 麵包屑導覽標記。
    • FAQ 僅用於頁面上確實有回答的問題。
    • 絕不在沒有價格的情況下使用 Offer。
    • 使用 Google 的 Rich Results Test 與 Schema.org 驗證器進行驗證。
  4. Robots、Sitemap、llms.txt:
    • 正式環境允許爬取並列出 sitemap;測試環境封鎖所有爬取(由核心處理);
    • /llms.txt 由核心提供;
    • 明確決定 AI 爬蟲是否可以讀取網站,然後檢查邊緣端是否預設封鎖了它們(wp-ship > cloudflare-edge.md)。
  5. 重新導向: 遵循專案的 docs/reference/REDIRECT_RULES.md。將每個有流量或反向連結的舊網址對應到最接近的新頁面(使用 301,一次跳轉),並逐一測試。
  6. 重大變更前確保一致性。 在重新設計、遷移或語言上線前,先擷取每個網址的標題、描述、標準網址與 H1。每個步驟後進行比較。僅針對預期的變更重新擷取,並在 commit 中記錄原因。
  7. Search Console 與 Bing:
    • 同時驗證兩個平台;
    • 提交 Sitemap;
    • 第一週每週監控頁面索引狀況;
    • Search Console 僅保留 16 個月的資料,因此請盡早匯出或啟用大量匯出功能。

語言步驟(每種語言先做試點)

遵循 references/multilingual.md。簡而言之:

  1. 第零條規則: 原始語言不變。其網址、標題、標準標籤與文字保持不變(一致性檢查可證明)。
  2. 試點: 語言基礎架構(Polylang、語言切換器、hreflang、.po/.mo 字串),然後是關鍵頁面與主要項目。接著由母語者在測試環境上進行審查,審查通過後才發布。
  3. 其餘部分 分批處理,每批都經過相同的審查流程。
  4. 尚未發布的語言 應以 302 重新導向至原始語言,並且不顯示在任何地方:不在 sitemap、hreflang、選單或語言切換器中。

檢查點(在 SITE_STATUS.md 中打勾)

  • npm run test:seo 在測試環境上通過;每種類型各一個頁面的 Rich Results 測試通過
  • 正式環境的 Sitemap、robots.txt 與 llms.txt 正確
  • 舊網址重新導向對應已建立並測試完成(或標記為「不適用」)
  • 每個額外語言:試點通過、母語審查完成、hreflang 配對完整、每個語言都有正確的標準網址

我們曾經發布過的錯誤,請務必檢查

  • 翻譯後的首頁標準網址指向原始首頁,導致 Google 從法文結果中移除 /fr/。翻譯頁面的標準網址應為翻譯後的網址。
  • 法文頁面上出現英文 JSON-LD:結構化資料必須跟隨頁面語言,否則應在翻譯完成前排除。
  • 檢查點將未發布的語言以 301 重新導向至首頁。檢查點應使用 302。

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

umairmsm/wp-build

Stage 3 of a wp-site-kit WordPress build - local DDEV site, the core must-use plugin (modules), the presentation-only child theme with skins, the content model (custom post types, meta, WP_Query, render functions), and the enquiry pipeline that saves leads before forwarding. Use when building or changing features, templates, content types, forms or plugin modules on a wp-site-kit site.

umairmsm/wp-content

Stage 4 of a wp-site-kit WordPress build - real copy and photos. Content truth (facts only from the owner), AI drafts and owner approval, claims audits, banned words and fake proof, legal pages, the photo pipeline (dedupe, real-only, EXIF strip, WebP sizes, alt text, AI image register), and recorded content changes. Use for "write the copy", "add photos", "the owner sent new photos", "check for duplicates", "update prices or text on the live site", "legal pages".

umairmsm/wp-design

Stage 2 of a wp-site-kit WordPress build - design direction, a static HTML/CSS prototype with design tokens, owner sign-off with screenshots, self-hosted fonts, and porting the approved look into a swappable WordPress skin. Use for "design the site", "new look", "redesign", "change colours or fonts", "make a new skin", "port the prototype to WordPress".

umairmsm/wp-kickoff

Stage 1 of a wp-site-kit WordPress build. Use when starting a new WordPress website or taking over or rebuilding an existing one - discovery brief, stack decision, creating the project with bin/wp-site-new, locked decisions, private repo and credentials inventory. Triggers - "new WordPress site", "start a client website", "rebuild this site", "take over this WordPress site".

umairmsm/wp-operate

Stage 8 of a wp-site-kit WordPress build and everything after launch - backups with an off-machine copy, restore drills, the disaster-recovery runbook, credentials inventory, update policy, alerts, and working from more than one machine (bridge file, workstation doctor, encrypted state bundle, rescuing unpushed work). Use for "backup", "restore", "move to a new machine/server", "update plugins", "what if the server dies", "work from the cloud box", "set up a second machine".

umairmsm/wp-ship

Stage 7 of a wp-site-kit WordPress build - staging behind Cloudflare Access, server hardening, safe deploys from a commit (scripts/deploy-safe.sh), database content changes, the launch audit, DNS cutover without breaking a running business, and the first week after launch. Use for "deploy", "set up staging", "go live", "launch", "cutover", "move DNS", "harden the server".

umairmsm/wp-site

Start here for any WordPress website built with wp-site-kit, from an empty folder to a live site. Use when someone says "build a WordPress site", "new website for a client", "where are we on the site", "what is next before launch", or asks to continue a site project. Finds the current stage from SITE_STATUS.md, applies the hard rules, and hands over to the right stage skill.

相關技能