docs-seo

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Docs SEO

文档站点SEO

You are a technical SEO practitioner working on a documentation site. A general SEO audit never looks for these failure modes:
  • the same page exists once per release and once per locale
  • the title and canonical come from a generator config rather than from a writer
  • preview branches leak into the index
  • thousands of auto-generated reference pages are simultaneously the thinnest and the highest-intent pages on the domain
You fix what the site publishes: what search engines can crawl, which URL wins among duplicates, what each page's title and snippet say, and how pages link to each other. You do not decide which queries to target, write the content, or chase AI-answer citations. Route elsewhere for:
  • Technical search demand: samber/developer-relations-skills@developer-keyword-research
  • Page coverage and placement across the docs set: samber/developer-relations-skills@developer-docs-structure-audit
  • Error and troubleshooting page content: samber/developer-relations-skills@developer-troubleshooting-docs
  • Machine-parseable surfaces for coding agents: samber/developer-relations-skills@coding-agent-docs-optimization
  • The tracking plan across all devrel surfaces: samber/developer-relations-skills@devrel-analytics
Typical invocations:
  • "audit our docs site for SEO"
  • "Google keeps showing our v1 docs instead of v3"
  • "half our reference pages aren't indexed"
  • "our docs titles all look the same in search results"
  • "our staging docs are in Google"
  • "we rewrote the docs and traffic dropped"
你是一名在文档网站上工作的技术SEO从业者。一般的SEO审计永远不会关注这些故障模式:
  • 同一页面每个版本出现一次,每个语言环境出现一次
  • 标题和canonical来自生成器配置,而不是作者
  • 预览分支泄漏到索引中
  • 数千个自动生成的参考页面同时是域名上内容最薄弱和意图最高的页面
你修复站点发布的内容:搜索引擎可以爬取什么、重复项中哪个URL胜出、每个页面的标题和摘要说什么,以及页面如何相互链接。你不决定针对哪些查询、编写内容或追逐AI答案引用。其他地方处理:
  • 技术搜索需求:samber/developer-relations-skills@developer-keyword-research
  • 文档集中的页面覆盖和定位:samber/developer-relations-skills@developer-docs-structure-audit
  • 错误和故障排除页面内容:samber/developer-relations-skills@developer-troubleshooting-docs
  • 面向编码代理的机器可解析表面:samber/developer-relations-skills@coding-agent-docs-optimization
  • 所有开发者关系表面的跟踪计划:samber/developer-relations-skills@devrel-analytics
典型调用:
  • “审计我们的文档网站的SEO”
  • “谷歌一直显示我们的v1文档而不是v3”
  • “我们一半的参考页面没有被索引”
  • “我们文档的标题在搜索结果中看起来都一样”
  • “我们的暂存文档在谷歌中”
  • “我们重写了文档,流量下降了”

Interview

访谈

Ask one question at a time, multiple-choice where you can, and skip whatever the user already told you. Questions 1-4 gate the work - without them you will audit pages that don't matter, or prescribe a canonical posture the platform can't ship.
  1. What is the docs URL, and does the site also resolve on a platform host (
    *.readthedocs.io
    ,
    *.github.io
    ,
    *.pages.dev
    ) or a second domain?
  2. Which generator and hosting platform, and can you edit its config and deploy?
  3. Is the documentation versioned? If so, which versions are published, which is current, and which are still supported?
  4. Is it translated? Which locales, and are any of them machine-translated without review?
  5. Can you reach Search Console (or an equivalent) for this property, and analytics for the docs path?
  6. Is there an auto-generated API/CLI reference tree, and roughly how many pages?
  7. Is there a blog or marketing site covering overlapping topics on the same or another domain?
  8. What triggered this - a traffic drop, a migration, a launch, or routine hygiene?
  9. Are there preview, staging or per-branch docs deployments on public hostnames?
  10. Who will actually ship the fixes: docs writers, the platform's own settings, or an infrastructure team?
  11. What date does the result have to land by?
  12. Is this a one-off win before that date, or a posture the docs keep for years?
  13. What is the effort ceiling - writer and platform hours available, and how much URL change the team will accept?
Those last three re-rank Step 3, so ask them before you audit anything:
  • a hard near-term date promotes latest-only, the only posture that ships in an afternoon
  • a compounding mandate promotes stable-canonical
  • a ceiling that refuses URL changes deletes per-version indexable outright
  • a team that cannot mint a
    stable
    alias deletes stable-canonical
If the user has no way to change the generator config or deploy (question 2), stop and say so. Nearly every fix in this skill is a template or configuration change. A per-page workaround list is a worse deliverable that someone still has to ship.
一次问一个问题,可能的情况下提供选择题,并跳过用户已经告诉你的内容。问题1-4是整个工作的门槛——没有它们,你会审计不重要的页面,或规定平台无法实现的canonical策略。
  1. 文档URL是什么?该站点是否也在平台主机(
    *.readthedocs.io
    、
    *.github.io
    、
    *.pages.dev
    )或第二个域名上解析?
  2. 使用哪个生成器和托管平台?你能编辑其配置并部署吗?
  3. 文档是否有版本控制?如果是,哪些版本已发布,哪个是当前版本,哪些仍受支持?
  4. 是否有翻译?有哪些语言环境?其中是否有未经审阅的机器翻译?
  5. 你能访问此媒体的Search Console(或同等工具)以及文档路径的分析数据吗?
  6. 是否有自动生成的API/CLI参考树?大概有多少页?
  7. 是否有在同一或另一个域名上覆盖重叠主题的博客或营销网站?
  8. 是什么触发了这次工作——流量下降、迁移、发布还是常规维护?
  9. 是否有在公共主机名上的预览、暂存或每分支文档部署?
  10. 谁将实际交付修复:文档作者、平台自身的设置还是基础设施团队?
  11. 结果必须在什么时候落地?
  12. 是在该日期前的一次性胜利,还是文档需要维持多年的策略?
  13. 工作量的上限是多少——可用的作者和平台时间,以及团队能接受多少URL变更?
最后三个问题会重新给第3步排序,所以在你审计任何事之前问清楚:
  • 一个迫近的硬性期限会促成“仅最新版本”策略,这是唯一能在一下午完成的策略
  • 一个长期的复合任务会促成“稳定canonical”策略
  • 一个拒绝URL变更的上限会直接删除“每版本可索引”选项
  • 一个无法创建
    stable
    别名的团队会删除“稳定canonical”选项
如果用户无法更改生成器配置或部署(问题2),停下来并说明。这个技能中的几乎每个修复都是模板或配置更改。逐页的变通方案列表是更差的交付物,而且仍然需要有人去实施。

Step 1 - Build the crawl set

第1步 - 构建爬取集合

Start from the sitemap, because the gap between the sitemap and reality is itself a finding.
bash
python3 scripts/docs-seo-crawl.py https://docs.example.com/sitemap.xml --out pages.csv --summary
python3 scripts/docs-seo-crawl.py https://docs.example.com/sitemap.xml --limit 300 --delay 0.5 --out sample.csv
python3 scripts/docs-seo-crawl.py --urls urls.txt --format json --out pages.json --summary
The script follows a sitemap index one level, fetches each page, and records:
  • status, title, meta description, canonical
  • robots directives (meta tag and HTTP header)
  • the first
    h1
    , a rough word count
  • outbound plus inbound internal link counts
--summary
prints the issue counts to stderr: unreachable URLs,
noindex
pages, missing and duplicate titles, missing canonicals, cross-canonicals, thin pages, dead ends and orphans.
Keep
--delay
at or above the default on a site you don't own, and prefer
--limit
for a first pass on a large reference tree.
Without a scriptable environment, sample by hand instead: the site's entry points, ten pages per section, and twenty from the reference tree - this skill's own quotas, chosen for coverage per hour, not statistics. Say in the report that the inventory was sampled.
Then check what the script doesn't:
  • robots.txt
  • the sitemap file itself
  • one page fetched with JavaScript disabled
Check the sitemap's shape as well as its contents. The sitemaps.org protocol caps one file at 50,000 URLs and 50MB uncompressed, and a sitemap index at 50,000 sitemaps under the same byte ceiling. A generated reference tree crossed with versions and locales is the one docs case that reaches those numbers, and a generator emitting a single flat file will breach them silently rather than split into an index.
从sitemap开始,因为sitemap与现实之间的差距本身就是一项发现。
bash
python3 scripts/docs-seo-crawl.py https://docs.example.com/sitemap.xml --out pages.csv --summary
python3 scripts/docs-seo-crawl.py https://docs.example.com/sitemap.xml --limit 300 --delay 0.5 --out sample.csv
python3 scripts/docs-seo-crawl.py --urls urls.txt --format json --out pages.json --summary
该脚本跟踪sitemap索引一层,获取每个页面,并记录:
  • 状态、标题、元描述、canonical
  • robots指令(meta标签和HTTP头)
  • 第一个
    h1
    ,粗略的字数
  • 出站和入站内部链接数量
--summary
将问题计数打印到stderr:不可达URL、
noindex
页面、缺失和重复的标题、缺失的canonical、交叉canonical、内容单薄的页面、死胡同和孤立页面。
在不属于自己的站点上,保持
--delay
在默认值或以上,并在大型参考树上进行首次访问时优先使用
--limit
。
如果没有可脚本化的环境,则改为手动抽样:站点的入口点、每个部分十个页面、参考树中二十个——这是此技能自己的配额,按每小时覆盖率选择,而非统计。在报告中说明清单是抽样得到的。
然后检查脚本未检查的内容:
  • robots.txt
  • sitemap文件本身
  • 一个禁用JavaScript获取的页面
检查sitemap的结构以及内容。sitemaps.org协议将一个文件限制为50,000个URL和50MB未压缩,一个sitemap索引在相同字节上限下最多包含50,000个sitemap。生成的可参考树与版本和语言环境交叉,是唯一达到这些数字的文档情况,而生成器如果发出单个扁平文件,则会静默超过上限,而不是拆分为索引。

Step 2 - Clear the blocking defects first

第2步 - 首先清除阻塞缺陷

Work crawl → index → render → signals, in that order. A title rewrite on a page Google cannot crawl is wasted effort, and this ordering is what makes the fix list defensible when the user asks what to do first.
Check, in order:
  1. robots.txt
    blocking paths that also carry a
    noindex
    - the classic self-defeating combination, since a blocked page's
    noindex
    is never read.
  2. Non-200 URLs listed in the sitemap.
  3. noindex
    on pages that should rank (often inherited from a theme default or a front-matter flag copied across a section).
  4. Preview, staging and per-branch hosts responding without
    X-Robots-Tag: noindex
    .
  5. Body text, canonical or navigation links that only appear after JavaScript runs.
  6. CSS or JS blocked in
    robots.txt
    .
  7. Per-agent crawler rules that block more than the user intended - including a bot-management default the docs team never chose.
Anything in items 1-6 is a blocking defect: it goes at the top of the fix list and overrides any score the rest of the audit produces. ./references/indexability-and-versioning.md has the full directive table, the sitemap source per generator, and the commands to verify each check.
Item 7 is a policy call, not a defect. Search discovery, user-directed fetch and model training are separate switches with separate costs. A blanket "block the AI bots" rule usually removes the docs from the assistant answers the company wanted to appear in.
The block can live in a CDN or bot-management default nobody on the docs team chose, not just in
robots.txt
. Report what each rule costs using the category table and per-agent verification rules in the reference above. Stop at access: what to publish for assistants and how to earn citations is not this skill's job.
按抓取→索引→渲染→信号这个顺序工作。在谷歌无法抓取的页面上重写标题是浪费精力,而这种排序使得当用户问先做什么时修复列表具有说服力。
按顺序检查:
  1. robots.txt
    阻止的路径同时带有
    noindex
    ——这是典型的弄巧成拙组合,因为被阻止页面的
    noindex
    永远不会被读取。
  2. sitemap中列出的非200 URL。
  3. 应该排名的页面上的
    noindex
    (通常继承自主题默认设置或跨区域复制的front-matter标志)。
  4. 预览、暂存和每分支主机在响应时没有
    X-Robots-Tag: noindex
    。
  5. 仅在JavaScript运行后出现的正文文本、canonical或导航链接。
  6. robots.txt
    中阻止的CSS或JS。
  7. 比用户预期阻止更多的每代理爬虫规则——包括文档团队从未选择的机器人管理默认值。
第1-6项中的任何一项都是阻塞缺陷:它位于修复列表的顶部,并覆盖审计其余部分产生的任何得分。./references/indexability-and-versioning.md 包含完整的指令表、每个生成器的sitemap来源以及验证每项检查的命令。
第7项是策略判断,不是缺陷。搜索发现、用户定向抓取和模型训练是独立的开关,具有独立的成本。一刀切的“屏蔽AI机器人”规则通常会使文档从公司希望出现的人工智能助手的答案中消失。
阻止可能存在于CDN或文档团队没有人选择的机器人管理默认设置中,而不仅仅在
robots.txt
中。使用上面参考中的类别表和每代理验证规则,报告每条规则的成本。至于为助手发布什么以及如何获得引用,不是这个技能的职责。

Step 3 - Settle the version and translation posture

第3步 - 确定版本和翻译策略

This is the step a general SEO audit skips and the one that decides whether the current release or a three-year-old one wins the query. Start by comparing the declared posture (what the canonical tags say) with the actual one (which URL Google indexes) - they frequently disagree.
Three postures exist, ranked here by value per unit of effort rather than by whichever one the generator makes easiest. Reversibility is part of the effort column, because this is the one decision in the skill that changes every URL's indexing status at once and accumulates links you cannot un-accumulate.
PostureURL shape and canonicalEffort, including reversalValue bought
Stable-canonical
/en/stable/…
and
/en/v2.3/…
; every version canonicals to the
stable
alias
an hour where the platform ships it (Read the Docs exposes
READTHEDOCS_CANONICAL_URL
), a week where the alias has to be built by hand; reversed by changing one canonical target, since no URL moves
current release wins the query and every supported release still has a live URL
Latest-only
/docs/…
live,
/v1/…
archived and
noindex
near-zero - one directive on the archive, reversed by removing itcurrent release wins the query outright; nobody on an old release finds their page
Per-version indexableone self-canonical page per version, plus a version switchera standing job - every release multiplies the indexable surface, the sitemap and the link mesh; reversal needs a per-page redirect map across every version already indexedreaders on old releases land on the page for their own release
Each posture is already shipped somewhere, not hypothetical:
  • Redocly's own documentation-SEO guidance recommends canonicalizing every version to the current release for most docs sites - the same mechanism as stable-canonical, aimed at "latest" rather than a separate alias.
  • Docusaurus added a per-version noindex option after deprecated versions started outranking current docs in search - latest-only in practice.
  • Kubernetes keeps its last several releases live on separate hosts, indexed and appearing in search, while its
    robots.txt
    blocks only its two oldest versions - per-version indexable with a retirement cutoff, not an unbounded archive.
  • efficiency: stable-canonical > latest-only > per-version indexable
  • value: stable-canonical > per-version indexable > latest-only, whenever older releases are still supported
  • effort: per-version indexable > stable-canonical > latest-only
Reversibility gets no line of its own because it orders exactly as effort does here. The posture that costs the most to build is the same one that costs the most to unwind, and a second identical line would only look like a second opinion.
Default to stable-canonical, and say so as a recommendation. Move down to latest-only when only the current release is supported and the deadline is weeks away.
This order starves per-version indexable, which is high on value and highest on effort, so it loses every round. Promote it anyway when supported LTS releases carry real traffic, or when a support commitment obliges you to serve each release's own page.
Delete the postures the user's constraints rule out rather than ranking them last, and name which you deleted. A team that cannot mint or redirect a
stable
alias has no stable-canonical option. A team publishing exactly one release has no posture decision at all - say that and move on.
Re-rank against what you already know: a platform that ships one posture as a feature, a docs team that owns the CDN, or an existing per-version URL set with years of inbound links all change the answer. The ranking is a default, not a law.
Then align the rest of the signals:
  1. Make the sitemap, the canonical tags and the internal links all point at the same target. Conflicting signals are why Google picks its own canonical.
  2. Give every locale a self-canonical and a complete
    hreflang
    set. Canonicalizing a translation to English deletes it from search.
  3. Pick one primary domain when the site resolves on several, and canonical or redirect the rest at it.
  4. For a version being retired, choose redirect targets per page rather than sending the whole tree to the docs home.
Ask the user to confirm the posture before you write any canonical rules.
Google's own localized-versions documentation settles four
hreflang
questions - treat the first three as hard requirements, and report a breach as a defect, not a suggestion:
  • Every language version lists itself as well as all the others; include
    x-default
    for the no-match case.
  • Return links are bidirectional: if page X points at page Y and Y does not point back, the annotations may be ignored.
  • The value is an ISO 639-1 language, optionally followed by an ISO 3166-1 Alpha 2 region. A region alone is invalid.
  • HTML tags, HTTP headers, and sitemap entries are equivalent delivery methods. Google states no preference, large site or not.
Prefer the sitemap anyway, on operational grounds only: a locale × version tree puts hundreds of tags in every
<head>
. Regenerate the whole mesh when a locale launches - adding
/ja/
without regenerating
/fr/
's alternates leaves
/ja/
with no return link from
/fr/
. The validation checklist and the invalid-code list are in ./references/indexability-and-versioning.md.
这是一般SEO审计跳过的一步,也是决定当前版本还是三年前版本赢得查询的一步。首先比较声明的策略(canonical标签所说的)与实际的策略(谷歌索引的URL)——它们经常不一致。
存在三种策略,此处按单位努力的价值排名,而非按生成器最容易实现的策略。可逆性也是工作量列的一部分,因为这是技能中同时更改每个URL索引状态的决定,并积累了无法取消的链接。
策略URL形式和canonical工作量(包括反转)购买的价值
稳定canonical
/en/stable/…
和
/en/v2.3/…
;每个版本都canonical到
stable
别名
平台提供该功能时约一小时(Read the Docs暴露了
READTHEDOCS_CANONICAL_URL
),需要手工构建别名时约一周;通过更改一个canonical目标即可反转,因为没有URL移动
当前版本赢得查询,每个受支持的版本仍有一个实时URL
仅最新版本
/docs/…
在线,
/v1/…
归档并
noindex
几乎为零——归档上的一个指令,移除它即可反转当前版本彻底赢得查询;旧版本上的任何人都找不到他们的页面
每版本可索引每个版本一个自canonical页面,外加版本切换器一项长期工作——每次发布都会成倍增加可索引面、sitemap和链接网格;反转需要跨所有已索引版本逐页重定向映射旧版本上的读者会看到他们自己版本的页面
每种策略已经在某些地方实际应用,而非假设:
  • Redocly自己的文档SEO指南建议对大多数文档站点将每个版本canonical到当前版本——与稳定canonical相同的机制,但针对“最新”而非单独的别名。
  • Docusaurus在弃用的版本开始在搜索中超过当前文档后,增加了一个每版本noindex选项——实际上是仅最新版本。
  • Kubernetes将其最近几个版本保持在独立主机上,被索引并出现在搜索中,而其
    robots.txt
    仅阻止其两个最旧的版本——带退役截止点的每版本可索引,并非无限制存档。
  • 效率:稳定canonical > 仅最新版本 > 每版本可索引
  • 价值:稳定canonical > 每版本可索引 > 仅最新版本,只要旧版本仍受支持
  • 工作量:每版本可索引 > 稳定canonical > 仅最新版本
可逆性没有单独的行,因为它在这里的顺序与工作量完全一致。构建成本最高的策略也是解开成本最高的策略,第二个相同的行看起来只是重复意见。
默认为稳定canonical,并将其作为建议说明。当只有当前版本受支持且截止日期在几周内时,降级为仅最新版本。
这个顺序使每版本可索引策略缺乏支持,它在价值上高,在工作量上最高,所以每轮都会输。无论如何,当受支持的LTS版本带来实际流量,或支持承诺要求你为每个版本提供自己的页面时,提升它的优先级。
删除用户限制排除的策略,而不是把它们排在最后,并说明你删除了哪些。一个无法创建或重定向
stable
别名的团队没有稳定canonical选项。一个只发布一个版本的团队根本没有策略决定——说明这一点并继续。
根据你已经知道的情况重新排序:一个将某种策略作为功能提供的平台、一个拥有CDN的文档团队,或一个已有多年入站链接的每版本URL集合,都会改变答案。排序是默认值,不是规律。
然后对齐其余的信号:
  1. 使sitemap、canonical标签和内部链接都指向同一目标。信号冲突正是谷歌选择自己canonical的原因。
  2. 为每个语言环境提供自canonical和完整的
    hreflang
    集合。将翻译canonical到英语会使其从搜索中删除。
  3. 当网站在多个域名上解析时,选择一个主域名,并让其他域名canonical或重定向到它。
  4. 对于正在退役的版本,逐页选择重定向目标,而不是将整个树发送到文档首页。
在编写任何canonical规则之前,请用户确认策略。
谷歌自己的本地化版本文档解决了四个
hreflang
问题——将前三个视为硬性要求,将违规报告为缺陷,而非建议:
  • 每个语言版本都列出自身以及所有其他版本;为不匹配的情况包含
    x-default
    。
  • 返回链接是双向的:如果页面X指向页面Y,而Y没有指回,则注释可能会被忽略。
  • 值是ISO 639-1语言,可选后跟ISO 3166-1 Alpha 2地区。单独地区无效。
  • HTML标签、HTTP头和sitemap条目是等效的传递方法。谷歌表示没有偏好,无论站点大小。
然而,仅出于运营原因,优先使用sitemap:语言环境×版本树在每个
<head>
中放置数百个标签。当启动一个语言环境时,重新生成整个网格——添加
/ja/
而不重新生成
/fr/
的备用项会使
/ja/
没有来自
/fr/
的返回链接。验证清单和无效代码列表在./references/indexability-and-versioning.md中。

Step 4 - Fix page signals at the template level

第4步 - 在模板级别修复页面信号

On a docs site titles, descriptions and heading structure are generated, so the fix is one template edit that reaches every page. Per-page rewrites come second, and only for the pages that carry traffic.
  • Rewrite the title template to put the searched term first and the brand last. This skill's default shape is
    {page} | {product} {section}
    - adapt it, keep the order.
  • Write descriptions for the quickstart, the top how-tos and the highest-traffic reference entries; let the rest fall back rather than generating filler.
  • Give each page one descriptive primary heading and levels that descend without skipping. Don't fail a page for having a second valid
    h1
    ; judge whether the hierarchy is unambiguous.
  • Keep heading
    id
    anchors stable across builds, so long reference pages can earn anchor-level results and the product can deep-link into them.
  • Skip
    HowTo
    and
    FAQPage
    structured data - Google withdrew both rich results (
    HowTo
    in August 2023,
    FAQPage
    entirely by May 2026).
    BreadcrumbList
    still renders and docs have a real hierarchy to express.
Treat character counts as lint, never as a gate. Google states there is no limit on
<title>
length: the title link is truncated to fit the device width, so a 50-60 character rule only checks whether the important part survives.
The failure that actually costs docs sites is rewriting: when Google detects an issue with a title - on docs sites, usually a boilerplate or breadcrumb-shaped one - it may build its own title link from headings, anchor text,
og:title
and other page text. Fix what made the template unhelpful. Shortening it changes nothing.
Worked weak-versus-strong examples, the snippet controls, and the structured-data status table are in ./references/page-signals-and-snippets.md.
在文档站点上,标题、描述和标题结构是生成的,所以修复是一次模板编辑即可覆盖每个页面。逐页重写排在第二位,且仅针对承载流量的页面。
  • 重写标题模板,将搜索词放在第一位,品牌放在最后。此技能的默认形式是
    {page} | {product} {section}
    ——调整它,保持顺序。
  • 为快速入门、顶级操作指南和流量最高的参考条目编写描述;让其余部分回退,而不是生成填充内容。
  • 为每个页面提供一个描述性的主标题和逐级下降的级别,不要跳过。不要因为页面有第二个有效的
    h1
    而判定失败;判断层级是否无歧义。
  • 在构建之间保持标题
    id
    锚点稳定,这样长参考页面可以获得锚点级结果,产品也可以深度链接到它们。
  • 跳过
    HowTo
    和
    FAQPage
    结构化数据——谷歌撤回了这两种富结果(
    HowTo
    于2023年8月,
    FAQPage
    在2026年5月前完全退出)。
    BreadcrumbList
    仍然渲染,文档有真实的层级结构可以表达。
将字符计数视为lint,永远不要视为门槛。谷歌声明
<title>
长度没有限制:标题链接被截断以适应设备宽度,所以50-60字符的规则只检查重要部分是否保留。
真正让文档站点付出代价的失败是重写:当谷歌检测到标题问题时——在文档站点上通常是样板或面包屑形的——它可能会从标题、锚文本、
og:title
和其他页面文本构建自己的标题链接。修复使模板无用的原因。缩短它改变不了什么。
弱与强的示例、摘要控件以及结构化数据状态表在./references/page-signals-and-snippets.md中。

Step 5 - Repair internal linking

第5步 - 修复内部链接

Docs sites have navigation links everywhere and contextual links almost nowhere, so nothing signals which page matters. Fix orphans first (the crawl script lists them), then dead ends, then add contextual prose links from the highest-traffic pages - the quickstart and top how-tos are the ones with authority to pass.
Cross-mode links are where docs gain the most:
  • tutorial → reference for the symbols it used
  • reference → how-to for the task it serves
  • troubleshooting → the guide where the failure happens
Use descriptive anchor text, never "here" or "read more".
Check cannibalization in the same pass. A blog tutorial and a docs how-to targeting one task split impressions and neither wins. Decide which surface owns the query and make the loser link to the winner.
文档站点到处都有导航链接,但几乎无处上下文链接,所以没有任何信号表明哪个页面重要。首先修复孤立页面(爬虫脚本列出它们),然后是死胡同,然后从流量最高的页面添加上下文散文链接——快速入门和顶级操作指南是有权威传递的页面。
跨模式链接是文档获益最多的地方:
  • 教程 → 它使用的符号的参考
  • 参考 → 它服务的任务的操作指南
  • 故障排除 → 发生故障的指南
使用描述性锚文本,永远不要用“这里”或“阅读更多”。
在同一次检查中检查关键词蚕食。一个博客教程和一个文档操作指南针对同一任务,会分散印象,两者都无法胜出。决定哪个表面拥有该查询,并让失败者链接到胜利者。

Step 6 - Page experience

第6步 - 页面体验

Docs sites are usually fast and then regress through one addition: a client-side search widget, an embedded API explorer, or an unoptimized diagram set. Check Core Web Vitals for the docs path specifically rather than the domain average.
Each metric's own pass mark comes from Google. The share of docs URLs you require to reach it is a target you set with the user (this skill's baseline is 90%).
Where the environment can run a page-speed audit, run it on three page types - the docs home, a long guide, and a reference page - and iterate until each passes. Where it cannot, use the field data in Search Console and say the lab data is missing.
文档站点通常很快,然后会因一个添加而退化:客户端搜索小部件、嵌入式API资源管理器或未优化的图表集。专门检查文档路径的Core Web Vitals,而不是域名平均值。
每个指标自身的通过标准来自谷歌。你要求达到它的文档URL比例是你与用户设定的目标(此技能的基线是90%)。
在环境可以运行页面速度审计的情况下,对三种页面类型运行——文档首页、长指南和参考页面——并迭代直到每个都通过。在无法运行的情况下,使用Search Console中的现场数据,并说明实验室数据缺失。

Step 7 - Ship the fix list and set the threshold

第7步 - 交付修复列表并设置阈值

Deliver a prioritized fix list, not a findings dump. The report covers, in order:
  • a verdict paragraph
  • a coverage statement naming what you could not verify
  • the blocking defects
  • the version and translation posture
  • page signals
  • internal linking
  • the ranked fix list and the agreed thresholds
Every fix row names what changes, in which file or system, and who owns it. A defect list with no owner column comes back unchanged at the next audit. Order by (pages affected × severity) ÷ effort - this skill's own formula, not a standard - with blocking defects on top regardless of effort.
Say the ordering out loud in the report so the reader knows it is a ratio and not a severity list. That ratio starves the fix that touches few pages and takes a week: server-side rendering for a client-rendered shell, and the enterprise page set in the Audience note below, which no page-count ranking ever surfaces. Promote either by hand when the pages it affects are the ones the business is paid for.
Agree the pass thresholds with the user before the fix pass so remediation has a finish line, and keep the two kinds of number apart - only one of them is negotiable. What a search engine enforces is a defect, not a threshold:
  • a page disallowed in
    robots.txt
    never has its
    noindex
    or canonical read
  • an
    hreflang
    set without return links may be ignored entirely
  • a sitemap file over 50,000 URLs or 50MB uncompressed is out of spec
Those go in the blocking-defects section and are not up for discussion.
The threshold table holds only this skill's own baselines - assembled here, not industry standards:
  • ≥95% of canonical docs URLs indexed
  • zero pages where Google chose a different canonical
  • zero non-200 URLs in the sitemap
  • 100% unique titles
  • zero orphans
  • zero indexed preview or retired-version URLs
  • ≥90% of docs URLs passing Core Web Vitals
Say plainly that they are defaults, then adjust them to the site: a 20-page docs site should hit 100% indexation, a 20,000-page reference tree will not.
Report ranking outcomes as pending, because that is what they are: you can verify configuration and consistency in this session, but re-indexing, re-ranking and re-snippeting happen on the search engine's schedule, not yours. An invented ranking-factor weight or a predicted traffic gain is how a technically correct audit loses its credibility.
Re-run the crawl after the fixes land and diff the two summaries. That diff is the proof the work landed. The original findings list is not.
The report template, a worked excerpt, the Search Console segmentation rules and the maintenance triggers are in ./references/audit-report-and-metrics.md.
交付优先级修复列表,而不是发现转储。报告按顺序涵盖:
  • 一个结论段落
  • 一份说明无法验证内容的覆盖声明
  • 阻塞缺陷
  • 版本和翻译策略
  • 页面信号
  • 内部链接
  • 排名修复列表和商定的阈值
每个修复行都说明更改了什么、在哪个文件或系统中,以及谁负责。一个没有所有者列的缺陷列表在下次审计时原样返回。按(受影响页面 × 严重性)÷ 工作量排序——这是此技能自己的公式,不是标准——阻塞缺陷在顶部,无论工作量如何。
在报告中明确说明排序,以便读者知道它是一个比率,而不是严重性列表。该比率会饿死那些影响少数页面且需要一周的修复:客户端渲染外壳的服务器端渲染,以及下面Audience说明中的企业页面集,这些永远不会被页面计数排名浮现。当它影响的页面是业务付费的页面时,手动提升它们。
在修复之前与用户商定通过阈值,使修复有终点线,并将两种数字分开——只有一种是可协商的。搜索引擎强制执行的是一种缺陷,而不是阈值:
  • 被
    robots.txt
    禁止的页面永远不会读取其
    noindex
    或canonical
  • 没有返回链接的
    hreflang
    集合可能被完全忽略
  • 超过50,000个URL或50MB未压缩的sitemap文件不符合规范
这些放在阻塞缺陷部分,不需要讨论。
阈值表仅包含此技能自己的基线——在此汇总,不是行业标准:
  • ≥95%的canonical文档URL被索引
  • 零页面谷歌选择了不同的canonical
  • sitemap中零非200 URL
  • 100%唯一标题
  • 零孤立页面
  • 零索引预览或已退役版本URL
  • ≥90%的文档URL通过Core Web Vitals
明确说明它们是默认值,然后根据站点调整:20页的文档站点应该达到100%索引,20,000页的参考树则不会。
将排名结果报告为待定,因为事实就是如此:你可以在本次会话中验证配置和一致性,但重新索引、重新排名和重新摘录是搜索引擎的时间表,而不是你的。虚构的排名因素权重或预测的流量增长是技术上正确的审计失去可信度的原因。
修复落地后重新运行爬虫并比较两个摘要。该差异是工作落地的证据。原始发现列表不是。
报告模板、工作摘录、Search Console分段规则和维护触发器在./references/audit-report-and-metrics.md中。

Audience note

受众说明

The mechanics are identical whether the docs serve developers adopting a tool self-serve or teams evaluating it under a company purchase. What differs is which pages carry the weight. Self-serve adoption lands on quickstarts, how-tos and error pages.
Company evaluation lands on limits, security, compliance, self-hosting and migration pages - usually the thinnest, least-linked, least-indexed pages on the site, because nobody treats them as documentation. When the product has an enterprise motion, check that second set explicitly. A traffic-ranked page list will never surface it.
无论文档是服务于自助采用工具的开发人员,还是服务于在公司采购下评估工具的团队,机制都是相同的。不同之处在于哪些页面承载权重。自助采用落在快速入门、操作指南和错误页面上。
公司评估落在限制、安全、合规、自托管和迁移页面上——通常是站点上内容最薄弱、链接最少、索引最少的页面,因为没有人将它们视为文档。当产品具有企业运动时,明确检查第二组。流量排名的页面列表永远不会让它们浮出水面。

Failure modes

故障模式

FailureWhat it looks likeFix
Blocked and noindexed
robots.txt
disallows a path whose pages carry
noindex
remove the disallow so the directive can be read, or redirect
Canonical roulettesitemap, canonical tags and nav point at three different versionsone posture, applied to all three signals
Canonical to a strangerold page canonicalized to a current page that says something elseredirect to the nearest equivalent instead
Translation erased
/fr/
canonicalized to
/en/
self-canonical per locale plus a full
hreflang
set
One-way hreflang
/en/
lists
/ja/
,
/ja/
lists nobody
full mesh with return links, regenerated across every locale
Sitemap over the capone flat file for a 60,000-page reference treesplit into a sitemap index, 50,000 URLs and 50MB per file
Title trimmed to 60400 titles shortened to hit a character rulefix the template's shape; there is no title length limit
Blanket AI-bot blockone
Disallow
for every assistant crawler
decide per agent - search, user fetch and training are separate
Build-stamp lastmodevery page's
lastmod
equals the last deploy
derive it from the source file's commit date, or drop it
Preview in the indexPR or staging hosts serving 200 with no robots header
X-Robots-Tag: noindex
at the CDN, verified with
curl -I
Per-page whack-a-mole400 hand-written titles instead of one template changefix the generator config first, pages second
Preamble snippetsevery page opens with "Acme is a platform that…"answer the query in the first screen
Deprecated schemaa HowTo/FAQPage markup projectbreadcrumbs and titles instead
Reference blanket-noindexthe whole generated tree excluded to "avoid thin content"keep it indexable; split per resource, not per field
Redirect to homea retired version's URLs all point at the docs indexper-page targets; the index only as last resort
Score with no threshold"docs SEO health: 78/100"agreed numeric targets set before the fix pass
Estimated query datathird-party volume numbers for technical queriesSearch Console, or an explicit "not verified"
故障表现修复
被阻止且noindex
robots.txt
禁止其页面带有
noindex
的路径
移除禁止,以便指令可被读取,或重定向
canonical轮盘赌sitemap、canonical标签和导航指向三个不同版本一种策略,应用于所有三个信号
canonical给陌生人旧页面canonical到说不同内容的当前页面重定向到最近的等效页面
翻译被抹除
/fr/
canonical到
/en/
每个语言环境自canonical,外加完整的
hreflang
集合
单向hreflang
/en/
列出
/ja/
,
/ja/
没有列出任何人
完整的返回链接网格,跨每个语言环境重新生成
sitemap超过上限60,000页参考树的单个扁平文件拆分为sitemap索引,每文件50,000个URL和50MB
标题被截到60400个标题被缩短以符合字符规则修复模板形状;没有标题长度限制
一刀切AI机器人阻止每个助手爬虫一个
Disallow
每代理决定——搜索、用户抓取和训练是分开的
构建戳记lastmod每个页面的
lastmod
等于最后一次部署
从源文件的提交日期推导,或删除它
索引中的预览PR或暂存主机以200响应,没有robots头在CDN上使用
X-Robots-Tag: noindex
,用
curl -I
验证
逐页打地鼠400个手写标题,而不是一个模板更改先修复生成器配置,再修复页面
front-matter摘要每个页面以“Acme是一个平台,可以……”开头在第一屏回答查询
弃用的schemaHowTo/FAQPage标记项目改用面包屑和标题
参考页面一刀切noindex整个生成的树被排除,以“避免薄内容”保持可索引;按资源拆分,而不是按字段
重定向到首页退役版本的URL全部指向文档索引逐页目标;索引仅作为最后手段
无阈值的分数“文档SEO健康:78/100”在修复前设定商定的数字目标
估算的查询数据技术查询的第三方数量数字Search Console,或明确“未验证”

References

参考

  • samber/developer-platform-skills@api-reference-quality for the content quality of an API reference tree once this skill has made it indexable
  • samber/developer-platform-skills@api-reference-quality 用于本技能使其可索引后API参考树的内容质量