Skip to content

Add clipboard copy for code samples

Sarah German requested to merge 64-code-copy into main

What does this MR do and why?

Adds a Vue component to enable clipboard copy on code samples.

Screenshots, screen recordings, or links to review app

Before After On click
image image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. Visit a page with code blocks, like this: http://localhost:1313/ci/chatops/#trigger-a-cicd-job-using-chatops
  3. Verify you can copy code sample text to your clipboard by clicking the icon.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #64 (closed)

Edited by Sarah German

Merge request reports