Treblle / docs

Treblle documentation
5 stars 8 forks source link

feat(integration): adding "copy to clipboard" button to all code blocks #23

Open Nelwhix opened 9 months ago

Nelwhix commented 9 months ago

PR to fix Issue #19

Nelwhix commented 9 months ago

Hey @Nelwhix great job on this PR. So I noticed we'd have to use a client side component and have to wrap any code block with it. I think what would be more interesting is to find a way to add the copy button without touching the rendering of the code.

I find this article on the subject quite interesting

https://timneubauer.dev/blog/copy-code-button-in-astro/

Also I noticed with your current implementation, some of the code blocks now look like this

CleanShot 2023-10-10 at 11 27 56

Okay I will check the article and revert

Nelwhix commented 9 months ago

@DominusKelvin review again, I think it could use better icons though