probot.github.io icon indicating copy to clipboard operation
probot.github.io copied to clipboard

Adds a copy-to-clipboard button for code blocks in the documentation to improve developer experience.

Open Rishi2600 opened this issue 2 months ago • 3 comments

Fixes #645

Changes

  • Added a copy button that appears on hover over code blocks
  • Implemented clipboard functionality with fallback support for older browsers
  • Added visual feedback ("Copied!" confirmation message)
  • Styled with Primer CSS design conventions
  • Mobile-friendly (always visible on touch devices)

Implementation

  • Created js/copy-code.js with copy functionality and button creation logic
  • Created assets/css/copy-code.css with styling for the copy button
  • Updated _layouts/default.liquid to include the new CSS and JS files

For any feature updates or any other details, Contact - github.com/Rishi2600

Rishi2600 avatar Nov 21 '25 12:11 Rishi2600