feat(theme/EditLink): add edit link to outline sidebar#3164
Merged
SoonIter merged 1 commit intoweb-infra-dev:mainfrom Feb 28, 2026
Merged
feat(theme/EditLink): add edit link to outline sidebar#3164SoonIter merged 1 commit intoweb-infra-dev:mainfrom
SoonIter merged 1 commit intoweb-infra-dev:mainfrom
Conversation
6076508 to
8fa21b9
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an “Edit this page” action to the outline (right sidebar) and introduces documentation/type updates for placing LLMS UI actions in the outline sidebar instead of under the H1 (this appears to be work also covered by the prerequisite PR #3163).
Changes:
- Add
EditLinkRowto the outline sidebar bottom actions. - Introduce
llmsUI.placement('title' | 'outline') in shared theme types and docs, and gate H1 LLMS rendering on placement. - Add outline-row components for LLMS actions (
LlmsCopyRow,LlmsOpenRow) and update e2e fixture config to use outline placement.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/plugin/official-plugins/llms.mdx | Mentions LLMS UI can render under H1 or in outline; shows placement: 'outline' example. |
| website/docs/zh/guide/basic/ssg-md.mdx | Documents placement: 'outline' option for LLMS UI. |
| website/docs/zh/api/config/config-theme.mdx | Adds placement to LlmsUI type docs and documents the new option. |
| website/docs/en/plugin/official-plugins/llms.mdx | Mentions outline placement and adds example config. |
| website/docs/en/guide/basic/ssg-md.mdx | Documents placement: 'outline' option for LLMS UI. |
| website/docs/en/api/config/config-theme.mdx | Adds placement to LlmsUI type docs and documents the new option. |
| packages/shared/src/types/theme/index.ts | Adds placement?: 'title' | 'outline' to LlmsUI type. |
| packages/core/src/theme/components/Outline/index.tsx | Adds EditLinkRow to outline bottom section. |
| packages/core/src/theme/components/Outline/index.scss | Adds shared outline “action row” styling and dropdown positioning tweaks. |
| packages/core/src/theme/components/Outline/LlmsOpenRow.tsx | Adds an outline dropdown row for “Open in chat” options. |
| packages/core/src/theme/components/Outline/LlmsCopyRow.tsx | Adds an outline row for “Copy Markdown”. |
| packages/core/src/theme/components/Outline/EditLinkRow.tsx | New outline row that uses existing useEditLink hook to render edit link. |
| packages/core/src/theme/components/DocContent/docComponents/title.tsx | Suppresses H1 LLMS UI when placement is 'outline'. |
| e2e/fixtures/plugin-llms/rspress.config.ts | Sets llmsUI.placement to 'outline' in the fixture config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reuse the existing `useEditLink` hook to render an "Edit this page" link in the outline bottom section, leveraging the native `themeConfig.editLink` configuration.
8fa21b9 to
4119927
Compare
SoonIter
approved these changes
Feb 28, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useEditLinkhook and nativethemeConfig.editLinkconfiguration — no new config neededTest plan
themeConfig.editLink.docRepoBaseUrland verify the link appears in the outlineeditLinkis not configured