Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Adding copy button to code snippets #78

Closed
aguschin opened this issue May 25, 2022 · 3 comments
Closed

Adding copy button to code snippets #78

aguschin opened this issue May 25, 2022 · 3 comments

Comments

@aguschin
Copy link
Contributor

In the code snippets, there is no button to copy the code. This is usually a very useful feature. I mean code snippets in docs. This is the example from Terraform docs:
image

I guess this should be added to the common docs-engine and introduced to dvc.org/doc and cml.dev/doc as well.

One thing to note is that for shell code snippets we always add $ at the beginning of the line. It shouldn't be copied. Also those scripts usually have some output, it shouldn't be copied also:
image

For python snippets, AFAIK, we don't add any outputs, so those should be copied in full. The same goes for yaml snippets.

cc @rogermparent

@julieg18
Copy link
Contributor

This is in discussion in dvc.org#3528! Should we close this issue and continue the discussion there?

@aguschin
Copy link
Contributor Author

Sure, thank you! Didn't find that one.

@aguschin aguschin closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2022
@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented May 25, 2022

Or/and move that dvc.org issue to a feature request in https://github.com/iterative/gatsby-theme-iterative 🙂

@julieg18 julieg18 reopened this May 25, 2022
@julieg18 julieg18 closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants