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

# EditLink

`EditLink` renders an "Edit this page" link that navigates to the document source file's editing page (e.g., GitHub).

## Usage

This component is rendered automatically in both the [DocFooter](https://rspress.rs/ui/layout-components/doc-footer.md) and the right-side outline panel, and doesn't need manual usage.

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

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

## Props

| Prop        | Type      | Default | Description                                                                                                                                                |
| ----------- | --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `isOutline` | `boolean` | `false` | When `true`, renders a compact style with an edit icon for use in the outline panel. When `false`, renders the default text link style for the doc footer. |

## Related configuration

Configure `editLink` in `rspress.config.ts`:

```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: '📝 Edit this page on GitHub',
    },
  },
});
```

- `docRepoBaseUrl` - Base URL of the documentation repository
- `text` - Text displayed on the link

If `editLink` is not configured, the component won't render anything.
