Skip to content

docs: add code copy button for code blocks with no output#576

Merged
cmainas merged 2 commits intourunc-dev:main-pr576from
neo-0007:feat/enable-copy/pr-432-rework
May 11, 2026
Merged

docs: add code copy button for code blocks with no output#576
cmainas merged 2 commits intourunc-dev:main-pr576from
neo-0007:feat/enable-copy/pr-432-rework

Conversation

@neo-0007
Copy link
Copy Markdown
Contributor

Description

This PR builds in top of #432

@MUFFANUJ implemented the feature and logic for:

  • copy button feature and styling
  • use .language-console in custom css to disable copy button for code blocks with output ( reason in issue discussion )

@neo-0007 Fixed the issues described in #432 (comment)

  • rename all code blocks with output as console so that the copy button gets disabled
  • fix auto expand of toc in left navigation menu

Related issues

How was this tested?

This was tested by locally running the mkdocs site:

After Change:

copy-button
image

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
Copy Markdown

netlify Bot commented Apr 27, 2026

Deploy Preview for urunc ready!

Name Link
🔨 Latest commit f84700c
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/69fe370f7658600008b50182
😎 Deploy Preview https://deploy-preview-576--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.

@neo-0007
Copy link
Copy Markdown
Contributor Author

Hi @cmainas , can you allow the workflows to run ?

Copy link
Copy Markdown
Contributor

@cmainas cmainas left a comment

Choose a reason for hiding this comment

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

Hello @neo-0007 ,

thank you for this PR. The preview looks good with the copy button. I have added a comment about some changes which do not seem necessary.

Other than than, since https://github.com/urunc-dev/urunc/pull/432is still open, I would suggest we give another chance for the author to respond. If they respond, then we can merge the changes of this PR with #432 . Otherwise, we will just drop #432.

@@ -6,14 +6,14 @@
Light Theme: urunc
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are the changes in this file necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These changes were made by @MUFFANUJ so I did not removed them.
From what I see, these changes do not affect anything since only the casing was changed. I can remove those if you want.

@neo-0007
Copy link
Copy Markdown
Contributor Author

neo-0007 commented May 4, 2026

Other than than, since https://github.com/urunc-dev/urunc/pull/432is still open, I would suggest we give another chance for the author to respond. If they respond, then we can merge the changes of this PR with #432 . Otherwise, we will just drop #432.

I talked with the author of #432 here #482 (comment) , and he was okay with me taking this up. (ping @MUFFANUJ )

@cmainas
Copy link
Copy Markdown
Contributor

cmainas commented May 8, 2026

Hello @neo-0007 ,

could you rebase over main then, so we can merge it?

MUFFANUJ and others added 2 commits May 9, 2026 00:46
Signed-off-by: anujkumar.singh <anujsinghhero292@gmail.com>
- fix navigation issues introduced in fb63bc5
- remove left toc bar auto expand in navigation sections
- rename code blocks with output as console
- add new contributor

- Should fix: urunc-dev#431

Signed-off-by: Hrishikesh Gohain <hrishikeshgohain123@gmail.com>
@neo-0007 neo-0007 force-pushed the feat/enable-copy/pr-432-rework branch from b4df42c to f84700c Compare May 8, 2026 19:18
@neo-0007
Copy link
Copy Markdown
Contributor Author

neo-0007 commented May 8, 2026

Hi @cmainas,

Rebased, Thanks :)

@urunc-bot urunc-bot Bot changed the base branch from main to main-pr576 May 11, 2026 06:44
Copy link
Copy Markdown
Contributor

@cmainas cmainas left a comment

Choose a reason for hiding this comment

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

Thank you @neo-0007 and @MUFFANUJ

@cmainas cmainas merged commit 55e45c0 into urunc-dev:main-pr576 May 11, 2026
37 checks passed
github-actions Bot pushed a commit that referenced this pull request May 11, 2026
PR: #576
Signed-off-by: anujkumar.singh <anujsinghhero292@gmail.com>
Reviewed-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Approved-by: Charalampos Mainas <cmainas@nubificus.co.uk>
github-actions Bot pushed a commit that referenced this pull request May 11, 2026
- fix navigation issues introduced in fb63bc5
- remove left toc bar auto expand in navigation sections
- rename code blocks with output as console
- add new contributor

- Should fix: #431

PR: #576
Signed-off-by: Hrishikesh Gohain <hrishikeshgohain123@gmail.com>
Reviewed-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Approved-by: Charalampos Mainas <cmainas@nubificus.co.uk>
urunc-bot Bot pushed a commit that referenced this pull request May 11, 2026
PR: #576
Signed-off-by: anujkumar.singh <anujsinghhero292@gmail.com>
Reviewed-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Approved-by: Charalampos Mainas <cmainas@nubificus.co.uk>
urunc-bot Bot pushed a commit that referenced this pull request May 11, 2026
- fix navigation issues introduced in fb63bc5
- remove left toc bar auto expand in navigation sections
- rename code blocks with output as console
- add new contributor

- Should fix: #431

PR: #576
Signed-off-by: Hrishikesh Gohain <hrishikeshgohain123@gmail.com>
Reviewed-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Approved-by: Charalampos Mainas <cmainas@nubificus.co.uk>
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

3 participants