> For AI agents: the complete documentation index is available at https://rspress.rs/zh/llms.txt, the full documentation bundle is available at https://rspress.rs/zh/llms-full.txt.

# EditLink

`EditLink` 用于渲染"编辑此页"链接，点击后跳转到文档源文件的编辑页面（如 GitHub）。

## 用法

该组件会自动渲染在 [DocFooter](https://rspress.rs/zh/ui/layout-components/doc-footer.md) 和右侧大纲面板中，无需手动使用。

```tsx preview
import { EditLink as BasicEditLink } from '@rspress/core/theme-original';

export default function EditLink() {
  return <BasicEditLink />;
}
```

## Props

| 属性          | 类型        | 默认值     | 描述                                                             |
| ----------- | --------- | ------- | -------------------------------------------------------------- |
| `isOutline` | `boolean` | `false` | 为 `true` 时，渲染带编辑图标的紧凑样式，用于大纲面板。为 `false` 时，渲染默认的文本链接样式，用于文档底部。 |

## 相关配置

在 `rspress.config.ts` 中配置 `editLink`：

```ts title="rspress.config.ts"
import { defineConfig } from '@rspress/core';

export default defineConfig({
  themeConfig: {
    editLink: {
      docRepoBaseUrl:
        'https://github.com/web-infra-dev/rspress/tree/main/website/docs',
      text: '📝 在 GitHub 上编辑此页',
    },
  },
});
```

- `docRepoBaseUrl` - 文档仓库的基础 URL
- `text` - 链接显示的文本

如果未配置 `editLink`，组件不会渲染任何内容。
