Skip to content

feat(theme/EditLink): add edit link to outline sidebar#3164

Merged
SoonIter merged 1 commit intoweb-infra-dev:mainfrom
Huxpro:Huxpro/outline-edit-link
Feb 28, 2026
Merged

feat(theme/EditLink): add edit link to outline sidebar#3164
SoonIter merged 1 commit intoweb-infra-dev:mainfrom
Huxpro:Huxpro/outline-edit-link

Conversation

@Huxpro
Copy link
Copy Markdown
Contributor

@Huxpro Huxpro commented Feb 27, 2026

Summary

  • Add an "Edit this page" link to the outline (right sidebar) bottom section
  • Reuses the existing useEditLink hook and native themeConfig.editLink configuration — no new config needed
  • Styled consistently with other outline action rows (ScrollToTop, LLMs buttons)

Note: This PR is based on #3163 (Huxpro/llm-reader-button-ui). Please merge #3163 first.

Test plan

  • Configure themeConfig.editLink.docRepoBaseUrl and verify the link appears in the outline
  • Verify the link does not appear when editLink is not configured
  • Verify the link opens in a new tab and points to the correct GitHub edit URL

Copilot AI review requested due to automatic review settings February 27, 2026 00:24
@Huxpro Huxpro force-pushed the Huxpro/outline-edit-link branch from 6076508 to 8fa21b9 Compare February 27, 2026 00:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 EditLinkRow to 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.
@SoonIter SoonIter force-pushed the Huxpro/outline-edit-link branch from 8fa21b9 to 4119927 Compare February 28, 2026 07:50
@SoonIter SoonIter changed the title feat(theme): add edit link to outline sidebar feat(theme/EditLink): add edit link to outline sidebar Feb 28, 2026
@SoonIter SoonIter enabled auto-merge (squash) February 28, 2026 08:49
@SoonIter SoonIter merged commit 1604515 into web-infra-dev:main Feb 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants