Skip to content

docs: fix broken fragment anchors and cross-reference links#578

Open
jimpablo wants to merge 1 commit into
MoonshotAI:mainfrom
jimpablo:docs/fix-broken-doc-anchors
Open

docs: fix broken fragment anchors and cross-reference links#578
jimpablo wants to merge 1 commit into
MoonshotAI:mainfrom
jimpablo:docs/fix-broken-doc-anchors

Conversation

@jimpablo

@jimpablo jimpablo commented Jun 9, 2026

Copy link
Copy Markdown

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 #fragment anchors do not match the target heading's slug:

  • Some EN pages still link to leftover Chinese-text anchors: #审批流程, #运行时开关, #provider-与供应商管理.
  • Some links use underscores where VitePress (the @mdit-vue/shared slugify) produces hyphens: #loop_control, ...-kimi_model.
  • hooks.md links to config-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):

File Before After
reference/keyboard.md (en) interaction.md#审批流程 #approval-flow
reference/tools.md (en) env-vars.md#运行时开关 #runtime-switches
reference/slash-commands.md (en/zh) providers.md#provider-与供应商管理 #provider-—-interactive-provider-management / #provider-—-交互式供应商管理
configuration/config-files.md (en/zh) #loop_control #loop-control
configuration/config-files.md & env-vars.md (en/zh) ...-kimi_model ...-kimi-model
customization/hooks.md (en/zh) config-files.md#hooks (no such anchor) config-files.md

The slugs follow VitePress's slugify (@mdit-vue/shared): underscore → -; em-dash () and CJK characters are kept literally; NFKD normalizes full-width parentheses to ASCII (so they also become -).

Verified by running vitepress build and confirming every updated link resolves to a generated heading id in .vitepress/dist — including the em-dash anchor #provider-—-interactive-provider-management and the CJK anchor #provider-—-交互式供应商管理.

This consolidates and supersedes #518, #522, #528, #530.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works. N/A — documentation-only change; no tests applicable.
  • Ran gen-changesets skill, or this PR needs no changeset. — docs-only PR; per CONTRIBUTING, no changeset needed.
  • Ran gen-docs skill, or this PR needs no doc update. — this PR is the doc update; the edited pages are hand-maintained.

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
Copilot AI review requested due to automatic review settings June 9, 2026 06:42
@changeset-bot

changeset-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1f759c6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) |

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants