Uh oh!
There was an error while loading. Please reload this page.
docs(contributing): 按现状改写文档目录说明,站点源是 content/docs/ (#3584) - #3597
Merged
Conversation
`### Writing Documentation` 开头的「All docs are in `docs/`」停在搬迁前,而它 正是新贡献者「文档写在哪」的第一落点 —— 照它做的人会把新页面放进根 `docs/`, 站点上永远不出现。 改写为两句,按机制不按枚举: - 站点页面在 `content/docs/**`,该根**只声明一处** —— `apps/site/source.config.ts` 的 `dir: '../../content/docs'`,文件在该根下的 路径即其 `/docs` 路由; - 仓库根 `docs/` **不属于站点**:放 ADR / 审计 / 架构笔记等内部材料,fumadocs 的 collection 根本不读它,因此不渲染、也没有 `/docs/...` 路由。 刻意**不写**「链接门禁不扫 `docs/`」一类的枚举式断言 —— #3572 / PR #3589 正要 把 `docs` 加进 `SCAN_ROOTS`,那句话落地当天就会变假。同节「Validating Links」 已经写了「read them there instead of trusting a list copied into prose」,本次 沿用同一种「指向声明处」的写法,与 #3585 刚改写的门禁分工段一致。 顺带把紧随的围栏两行注释由「docs」改为「documentation site」,以免与新段落里 刚刚区分开的根 `docs/` 混读。两条命令 `pnpm site:dev` / `pnpm site:build` 经核 实在根 package.json 中存在,未改。 Fixes#3584 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
The latest updates on your projects. Learn more about Vercel for GitHub. |
yinlianghui
marked this pull request as ready for review
August 7, 2026 15:11
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#3584
### Writing Documentation开头那句「We use fumadocs for documentation. All docs are indocs/.」停在搬迁前。它恰好是新贡献者「文档该写在哪」的第一落点 —— 照它做的人会把新页面放进根docs/,站点上永远不出现。前提复核(先在分支点上验,再动手)
四条只读命令全中,与单里一致:
分支点
39477b03b(含 #3585、#3571 对本文件的改动)。改动
一句改两句,按机制不按枚举:
content/docs/**,该根只声明一处 ——apps/site/source.config.ts的dir: '../../content/docs',文件在该根下的路径即其/docs路由;docs/不属于站点:放 ADR / 审计 / 架构笔记等内部材料,fumadocs 的 collection 根本不读它,因此不渲染、也没有/docs/...路由。baseUrl: '/docs'的机制说明没有重复写 —— 同节稍后的#### Why?已经拥有那段(锚点apps/site/lib/source.ts:7),这里只用一句把「路径即路由」接上去。刻意没写的一句
单的正文提到「链接门禁也不看那棵树(
SCAN_ROOTS里没有它)」。这句没有写进文档:#3572 / PR #3589 正要把docs加进SCAN_ROOTS,那条断言落地当天就会变假 —— 正是本单要修的那种「枚举式陈述随实现漂移」。同节「Validating Links」已经写了 read them there instead of trusting a list copied into prose,本次沿用同一种「指向声明处」的写法。与 #3585 的连贯性(读全节后确认)
同节其余段落无冲突,且互相接得上:
#### ❌ Incorrect Link Patterns已用「top-level section that does not exist undercontent/docs/」,#### Why?的baseUrl: '/docs',以及 #3585 刚改写的门禁分工段 —— 三处都以content/docs/为前提,此前唯独开头这句还停在docs/。围栏两行注释
顺带把紧随的围栏注释由
# Start docs dev server/# Build docs改为# Start the documentation site dev server/# Build the documentation site,以免与新段落里刚区分开的根docs/混读。属「该句 ± 最小相邻散文」,如实披露。两条命令经核实有效(单里要求的顺带确认):根
package.json有site:dev=pnpm --filter @object-ui/site dev、site:build=pnpm --filter @object-ui/site build,均未改。验证(先定方向,再跑)
node scripts/check-doc-links.mjsCONTRIBUTING.md不在SCAN_ROOTS内,结构上无从影响Links are valid across 3 scan roots.exit 0node scripts/check-control-bytes.mjsOK (scanned 3637 tracked text file(s); skipped 85 binary)pnpm exec vitest run scripts/ --maxWorkers=216 passed (16)/275 passed (275)grep -naP控制字符自扫(超出门禁扫描面)扫描面状态,如实记录
跑测时 PR #3589 尚未合并(
Links are valid across **3** scan roots即证据 ——content/docs/examples/README.md),所以CONTRIBUTING.md不在门禁扫描面内,上面那条 exit 0 并未真正校验本文件的链接。为了不把「空绿」当成证据,另做了一次预览:在 scratchpad 里 import 该脚本导出的
SCAN_ROOTS(可变数组)与collectBrokenLinks,push 一行{ path: 'CONTRIBUTING.md', rule: 'disk' }后重跑,未改任何被跟踪文件:即 #3589 落地后本文件依旧干净。另需说明:本改动新增的散文里没有任何 markdown 链接,只有行内代码;而
stripCode()会在扫描前抹掉行内代码 —— 所以即便扫描面覆盖到,这两段对该门禁也基本不可见。这是散文事实断言的通病,也正是本单「没有任何检查会因为这句话变假而变红」的由来。无 changeset:根目录文档,非用户可见的包变更。未触碰
content/docs/releases/。顺手发现(未在本 PR 修,已另立单)
#3596(未认领、未打标,留 PM 分诊):把「确认命令仍有效」这一步推到全文后发现,
CONTRIBUTING.md:84-91的### Running Development Servers三条命令 ——pnpm designer/pnpm prototype/pnpm docs:dev—— 在根package.json里一个都不存在,是新贡献者第一批照抄的命令。其中docs:dev与本单同源(docs:前缀站点脚本已改名到site:)。该处在 PM 认领评论锁定的文件面之外,按 Prime Directive #10 未在本 PR 修。Generated by Claude Code