Skip to content

Article sidebar: add the Copy Page block below the table of contents - #600

Merged
obenland merged 1 commit into
WordPress:trunkfrom
ndiego:add/copy-page-sidebar
Oct 12, 2026
Merged

obenland merged 1 commit into
WordPress:trunkfrom
ndiego:add/copy-page-sidebar

Conversation

@ndiego

@ndiego ndiego commented Oct 12, 2026

Copy link
Copy Markdown
Member

What

Adds the new wporg/copy-page block from WordPress/wporg-mu-plugins#780 to the article sidebar pattern. Every handbook page, code reference entry and WP-CLI command page includes this pattern, so they all get a Copy page button and a View as Markdown link for the Markdown rendering served at ?output_format=md.

Before After
Sidebar footer before Sidebar footer after: Copy page, View as Markdown, Back to top

Mobile is unchanged: the sidebar container hides the block below its floating breakpoint, like Back to top.

Depends on

WordPress/wporg-mu-plugins#780 must be merged and deployed first. Until the new build is synced, the pattern references an unregistered block: it renders nothing on the front end and shows an "unsupported block" placeholder in the site editor. Please sequence the deploys accordingly.

Notes

  • The wporg/copy-page block has a hasViewLink attribute (default on); this pattern uses the default.
  • Pages with fewer than two headings have no table of contents, so on those the sidebar shows just the two rows plus Back to top.
  • Tested locally against the mu-plugins branch with html-to-md active, on handbook pages, a code reference page and the /cli/commands/ archive (which also includes this pattern, and now copies itself).

This PR was generated by Claude Code on my behalf.

Adds the wporg/copy-page block from wporg-mu-plugins to the article sidebar
pattern, giving handbook pages a "Copy page" button and a "View as Markdown"
link for the Markdown rendering served at ?output_format=md. The sidebar
container hides it below the floating breakpoint, so mobile is unchanged.

Requires the wporg-mu-plugins change that adds the block to be deployed first.
@ndiego ndiego self-assigned this Oct 12, 2026
@ndiego ndiego added the [Type] Enhancement New feature or request label Oct 12, 2026
@ndiego
ndiego requested a review from obenland October 12, 2026 13:45
@obenland
obenland merged commit 20ca225 into WordPress:trunk Oct 12, 2026
1 check passed
@ndiego
ndiego deleted the add/copy-page-sidebar branch October 12, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants