Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add copy-to-clipboard button to docs code blocks #185

Merged
merged 2 commits into from
Jan 3, 2023

Conversation

edrogers
Copy link
Contributor

@edrogers edrogers commented Jan 3, 2023

Add a copy-to-clipboard button for each code snippet on the docs page. Uses the Code Copy Button feature from the mkdocs Material theme

Fixes #184

Tasks

  • Updated changelog.
  • Updated documentation.

@JoshKarpel JoshKarpel self-requested a review January 3, 2023 17:13
@JoshKarpel
Copy link
Owner

Sanity check - could you build the docs locally with mkdocs serve (https://www.spiel.how/contributing/) and make sure the copy buttons work?

@codecov
Copy link

codecov bot commented Jan 3, 2023

Codecov Report

Base: 82.5% // Head: 82.5% // No change to project coverage 👍

Coverage data is based on head (30025b6) compared to base (b6d4582).
Patch has no changes to coverable lines.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #185   +/-   ##
=====================================
  Coverage   82.5%   82.5%           
=====================================
  Files         33      33           
  Lines        843     843           
  Branches      96      96           
=====================================
  Hits         696     696           
  Misses       147     147           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@edrogers
Copy link
Contributor Author

edrogers commented Jan 3, 2023

Works for me!

Screenshot-2023-01-03-Quick Start-Spiel
(Colors modified and red circle added for emphasis)

@JoshKarpel JoshKarpel changed the title Docs add copy button Add copy-to-clipboard button to docs code blocks Jan 3, 2023
@JoshKarpel JoshKarpel merged commit c91216c into JoshKarpel:main Jan 3, 2023
@JoshKarpel JoshKarpel added the documentation Improvements or additions to documentation label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a copy button for code snippets in the docs
2 participants