how to put a copy button in a post with code #78
-
hello, nice proyect, Tried using sveltekit to copy the content of page.svelte.md to use a button inside ``` python
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Do you mean the "Copy Button" in the upper right corner of Fenced Code Blocks? Of course, Urara does not include this button. Among the sites built based on Urara that I know of, there are probably two implementation methods, they are: kwchang0831's urara.kwchang0831.dev You can take a look at their repositories, pick one you like, and add the required code to your repository. But I don't know how kwchang0831 made this button, I can only tell you how to add it according to Sevichecc's method:
After that, the button should appear. If it doesn't work, try restarting the dev server or rebuilding. Thanks for @Sevichecc. 👍 |
Beta Was this translation helpful? Give feedback.
Do you mean the "Copy Button" in the upper right corner of Fenced Code Blocks?
Of course, Urara does not include this button.
Among the sites built based on Urara that I know of, there are probably two implementation methods, they are:
kwchang0831's urara.kwchang0831.dev
Sevichecc's seviche.cc
You can take a look at their repositories, pick one you like, and add the required code to your repository.
But I don't know how kwchang0831 made this button, I can only tell you how to add it according to Sevichecc's method:
/src/lib/utils/copyCode.ts
file of the Sevichecc/Urara-Blog repository, and put it into the same/src/lib/utils/
directory in your repository.7e7745e
co…