Skip to content

Add “Copy Code” Button to Documentation Code Blocks#432

Open
MUFFANUJ wants to merge 5 commits intourunc-dev:mainfrom
MUFFANUJ:copyCodeCell
Open

Add “Copy Code” Button to Documentation Code Blocks#432
MUFFANUJ wants to merge 5 commits intourunc-dev:mainfrom
MUFFANUJ:copyCodeCell

Conversation

@MUFFANUJ
Copy link

@MUFFANUJ MUFFANUJ commented Feb 2, 2026

Description

This PR introduces a copy-to-clipboard button for code blocks in the documentation. The change improves usability by allowing users to quickly copy commands and examples directly from the docs, particularly in sections like Quickstart and Installation.

Related issues

How was this tested?

Screen.Recording.2026-02-03.at.5.05.15.AM.mov

LLM usage

N/A

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

@netlify
Copy link

netlify bot commented Feb 2, 2026

Deploy Preview for urunc ready!

Name Link
🔨 Latest commit 59d7122
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6983a9fea0e6780008b5cf5d
😎 Deploy Preview https://deploy-preview-432--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Signed-off-by: anujkumar.singh <anujsinghhero292@gmail.com>
Signed-off-by: anujkumar.singh <anujsinghhero292@gmail.com>
MUFFANUJ and others added 2 commits February 4, 2026 01:05
Signed-off-by: anujkumar.singh <anujsinghhero292@gmail.com>
@MUFFANUJ
Copy link
Author

MUFFANUJ commented Feb 4, 2026

@cmainas @panosmaurikos can you please review this :)

@cmainas
Copy link
Contributor

cmainas commented Feb 6, 2026

Hello @MUFFANUJ ,

thank you for this feature. Looking around the preview the copy button looks good and it indeed works. However, I noticed that:

  • the menu on the left side is always expanded compared to the current website
  • there are some leftover code blocks which also contain output and the copy button appears. Looking it a bit closer it seems that these code blocks are not annotated as console. For exmaple, take a look at the installation guide in the block sudo ctr plugin ls | grep devmapper. Would it be possible to identify these and mark them as console?

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.

Missing “Copy Code” Button in Documentation Code Blocks

2 participants