fix(docs): 相对链接不得逃出 docs_dir(OCP 契约) - #83
Merged
Tanya7z merged 1 commit intoJul 27, 2026
Merged
Conversation
将 ./docs/ 前缀特判升级为解析后必须落在 docs/ 内的单一规则, 并把 13 处 ../../仓内路径 改为 GitHub 绝对 URL,避免 Pages 404。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Tanya7z
marked this pull request as ready for review
July 27, 2026 06:48
Contributor
Author
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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 free
to 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.
Summary
审查 main@
a4cf856(合入 #82:MkDocs 首页路径 +./docs/契约)后的可验证残余问题,直接补丁。本轮 push 的 ootb / Docs / changeset-release 均已 success,无新 wf 失败。
MAJOR · OCP / DRY / Demeter(文档契约)
#82 的
assertNoRepoRootDocsLinks只特判](./docs/…)前缀,但站内仍有 13 处](../../sfmc|tools|.github|…)逃出docs_dir——Pages 上全部 404。为每种坏前缀继续打洞违反 OCP;与 mkdocsexclude重复维护plan/archive跳过列表也不完整(漏reviews)。修复:
docs/内(单一权威规则,同时覆盖 README 误贴与仓外相对路径)reference/sdkconfigs/pack-update.json为 gitignore,改为指向config.tsDEFAULTS)docs/CONTRIBUTING-DOCS.md写明链接约定本轮 push 其余评价
Test plan
](../../sfmc/…)→ 契约命中并 exit 1npm run docs:build成功(无 not_found 警告)