docs: fix broken fragment anchors and cross-reference links#578
docs: fix broken fragment anchors and cross-reference links#578jimpablo wants to merge 1 commit into
Conversation
Several doc cross-references pointed at stale Chinese-text anchors or used underscores where VitePress slugifies to hyphens, so the links resolved to nothing. Fix them to match the actual heading slugs: - keyboard.md: interaction.md#审批流程 -> #approval-flow - tools.md: env-vars.md#运行时开关 -> #runtime-switches - slash-commands.md (en/zh): providers.md /provider anchor - config-files.md (en/zh): #loop_control -> #loop-control - config-files.md / env-vars.md (en/zh): KIMI_MODEL_* anchor underscore -> hyphen - hooks.md (en/zh): drop the non-existent config-files.md#hooks fragment
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates internal documentation links and section anchors across English and Chinese docs to align references with current headings/IDs and improve navigation.
Changes:
- Updated multiple intra-doc links to use new/standardized fragment identifiers (anchors).
- Adjusted “Next steps” links in hooks docs to point to the broader config reference.
- Fixed some cross-language anchor references (e.g., EN docs no longer linking to ZH anchors).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/zh/reference/slash-commands.md | Updates /provider section link fragment in ZH slash command reference. |
| docs/zh/customization/hooks.md | Changes “Next steps” link target for config documentation (ZH). |
| docs/zh/configuration/env-vars.md | Updates anchor fragment for the “define model from env vars” section (ZH). |
| docs/zh/configuration/config-files.md | Updates loop_control anchor fragment in config field table (ZH). |
| docs/en/reference/tools.md | Fixes env-vars anchor to an English section name. |
| docs/en/reference/slash-commands.md | Updates /provider section link fragment in EN slash command reference. |
| docs/en/reference/keyboard.md | Updates link to the English “approval flow” section. |
| docs/en/customization/hooks.md | Changes “Next steps” link target for config documentation (EN). |
| docs/en/configuration/env-vars.md | Updates anchor fragment for the “define model from env vars” section (EN). |
| docs/en/configuration/config-files.md | Updates loop_control anchor fragment and env-vars deep link fragment (EN). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | `/login` | — | Select an account or platform and log in: Kimi Code uses OAuth device-code flow; Kimi Platform uses API key login | No | | ||
| | `/logout` | — | Clear credentials for the currently selected account | No | | ||
| | `/provider` | — | Open the interactive provider manager to view, add, and remove configured providers. See [Platforms & Models — `/provider` and provider management](../configuration/providers.md#provider-与供应商管理) | Yes | | ||
| | `/provider` | — | Open the interactive provider manager to view, add, and remove configured providers. See [Platforms & Models — `/provider` and provider management](../configuration/providers.md#provider-—-interactive-provider-management) | Yes | |
| | `/login` | — | 选择账号或平台并登录:Kimi Code 走 OAuth 验证码流程,Kimi Platform 通过 API 密钥登录 | 否 | | ||
| | `/logout` | — | 清除当前所选账号的凭据 | 否 | | ||
| | `/provider` | — | 打开交互式供应商管理器,查看、添加和删除已配置的供应商。详见[平台与模型 — `/provider` 与供应商管理](../configuration/providers.md#provider-与供应商管理) | 是 | | ||
| | `/provider` | — | 打开交互式供应商管理器,查看、添加和删除已配置的供应商。详见[平台与模型 — `/provider` 与供应商管理](../configuration/providers.md#provider-—-交互式供应商管理) | 是 | |
| ### `KIMI_MODEL_*` family | ||
|
|
||
| Switch models temporarily without modifying `config.toml` — when `KIMI_MODEL_NAME` is set, the CLI synthesizes a temporary provider in memory; the change does not persist after restart. See [Define a model from environment variables](#define-a-model-from-environment-variables-kimi_model). | ||
| Switch models temporarily without modifying `config.toml` — when `KIMI_MODEL_NAME` is set, the CLI synthesizes a temporary provider in memory; the change does not persist after restart. See [Define a model from environment variables](#define-a-model-from-environment-variables-kimi-model). |
| | `models` | `table` | — | Model alias table → [`models`](#models) | | ||
| | `thinking` | `table` | — | Default parameters for Thinking mode → [`thinking`](#thinking) | | ||
| | `loop_control` | `table` | — | Agent loop control parameters → [`loop_control`](#loop_control) | | ||
| | `loop_control` | `table` | — | Agent loop control parameters → [`loop_control`](#loop-control) | |
| ``` | ||
|
|
||
| You can also switch models temporarily without touching the config file — by setting `KIMI_MODEL_*` environment variables, the CLI synthesizes a temporary provider in memory that does not persist after restart. See [Define a model from environment variables](./env-vars.md#define-a-model-from-environment-variables-kimi_model). | ||
| You can also switch models temporarily without touching the config file — by setting `KIMI_MODEL_*` environment variables, the CLI synthesizes a temporary provider in memory that does not persist after restart. See [Define a model from environment variables](./env-vars.md#define-a-model-from-environment-variables-kimi-model). |
| | `models` | `table` | — | 模型别名表 → [`models`](#models) | | ||
| | `thinking` | `table` | — | Thinking 模式默认参数 → [`thinking`](#thinking) | | ||
| | `loop_control` | `table` | — | Agent 循环控制参数 → [`loop_control`](#loop_control) | | ||
| | `loop_control` | `table` | — | Agent 循环控制参数 → [`loop_control`](#loop-control) | |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f759c6bc8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ### `KIMI_MODEL_*` 系列 | ||
|
|
||
| 不修改 `config.toml` 临时切换模型——设置 `KIMI_MODEL_NAME` 后,CLI 在内存里合成一个临时供应商,重启后失效。详见[用环境变量定义模型](#用环境变量定义模型kimi_model)。 | ||
| 不修改 `config.toml` 临时切换模型——设置 `KIMI_MODEL_NAME` 后,CLI 在内存里合成一个临时供应商,重启后失效。详见[用环境变量定义模型](#用环境变量定义模型-kimi-model)。 |
There was a problem hiding this comment.
Keep the generated Chinese anchor intact
For the Chinese heading ## 用环境变量定义模型(\KIMI_MODEL_`), VitePress does not strip the full-width (…); the ASCII punctuation inside KIMI_MODEL_` is slugified, but the full-width parentheses remain in the generated id. This replacement therefore still points at a non-existent fragment, so the “详见” link in this subsection remains broken; use the actual generated anchor or add an explicit custom anchor to the heading.
Useful? React with 👍 / 👎.
Related Issue
No related issue. These are documentation-only link fixes; per CONTRIBUTING.md, documentation-only changes can be opened directly. The problem is described below.
Problem
Several in-docs cross-references resolve to nothing because their
#fragmentanchors do not match the target heading's slug:#审批流程,#运行时开关,#provider-与供应商管理.@mdit-vue/sharedslugify) produces hyphens:#loop_control,...-kimi_model.hooks.mdlinks toconfig-files.md#hooks, but no such heading exists on that page.What changed
Fixed each cross-reference to match the actual heading slug (EN + ZH where applicable):
reference/keyboard.md(en)interaction.md#审批流程#approval-flowreference/tools.md(en)env-vars.md#运行时开关#runtime-switchesreference/slash-commands.md(en/zh)providers.md#provider-与供应商管理#provider-—-interactive-provider-management/#provider-—-交互式供应商管理configuration/config-files.md(en/zh)#loop_control#loop-controlconfiguration/config-files.md&env-vars.md(en/zh)...-kimi_model...-kimi-modelcustomization/hooks.md(en/zh)config-files.md#hooks(no such anchor)config-files.mdThe slugs follow VitePress's slugify (
@mdit-vue/shared): underscore →-; em-dash (—) and CJK characters are kept literally;NFKDnormalizes full-width parentheses to ASCII (so they also become-).Verified by running
vitepress buildand confirming every updated link resolves to a generated headingidin.vitepress/dist— including the em-dash anchor#provider-—-interactive-provider-managementand the CJK anchor#provider-—-交互式供应商管理.This consolidates and supersedes #518, #522, #528, #530.
Checklist
I have added tests that prove my feature works.N/A — documentation-only change; no tests applicable.gen-changesetsskill, or this PR needs no changeset. — docs-only PR; per CONTRIBUTING, no changeset needed.gen-docsskill, or this PR needs no doc update. — this PR is the doc update; the edited pages are hand-maintained.