kyverno / website

User docs and sample policies: https://kyverno.io
Apache License 2.0
37 stars 155 forks source link

Copy button for code blocks #21

Closed chipzoller closed 4 years ago

chipzoller commented 4 years ago

You all have spent a lot of time writing some neat policies in the docs. It would be great if users could, with a simple button, copy the whole code block to the clipboard. Not sure what is being used for the site itself, else I would suggest.

chipzoller commented 4 years ago

So it's the docsy theme built with Hugo, which doesn't appear to have a copy button.

chipzoller commented 4 years ago

This is something I'm going to look at trying to include from our Clarity theme once we release v2.

JimBugwadia commented 4 years ago

Looks like Kubernetes docs, using the same theme, now have a copy button. Here's an example:

https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy/#limit-access-to-the-nginx-service

We can check how its implemented.

chipzoller commented 4 years ago

I already implemented it. Both branches have it now. 🙂

JimBugwadia commented 4 years ago

Awesome! Closing...