🚧 Rspress 2.0 document is under development
close

EditLink eject-only

Warning

This component is an eject-only component, specifically designed for wrap/eject, and it's not recommended to be used directly in MDX files.

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

Usage

This component is usually rendered automatically as part of DocFooter and does not need to be used manually.

Configure editLink in rspress.config.ts:

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 to display for the link

If editLink is not configured, the component will not render anything.