-
-
Notifications
You must be signed in to change notification settings - Fork 19
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 button for code blocks on MD files - branch #121
base: main
Are you sure you want to change the base?
Conversation
Deploying with Cloudflare Pages
|
Here it is. |
Congratulations! Of course you didn't have to re-do this but I'm glad you got it sorted out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working great, thanks!
Thanks for having a look at it! I’m still seeing a different typeface and drop shadow I mentioned here, and a faux-window-button effect for the |
So the faux window shown in the pic comes from this plugin.
This same plugin has the copy button. I have been trying to see if it can be extracted but that's tricky. It also tricky to remove those shadows styles I might look and see if any of the other ones might look closer to the nord we had. |
I’m all for adding a copy button and showing file paths when each is relevant and useful. But I’m uncomfortable with the PR because it introduces a new way of handling code blocks that...
If we’re going to overhaul code blocks, I think we should do it consistently and thoroughly. This adds a copy button to some of them while also creating a hodgepodge. |
Makes sense. We could leave it here until a better alternative arrives or maybe we can figure how to do full replacement with it. |
Where did we end up on this? |
We could get it to work on markdown files, but the quick-start page works differently. So we likely had to rework the quick-start page and make it into a markdown file instead of the current custom template. |
So there's no reasonable path for this right now I guess? Was a great initiative. |
I'm looking at Astro new https://starlight.astro.build/getting-started/ |
Would love to see this move forward. |
The Issue
Currently, blog posts don't have a copy button snippets of code. The DDev docs do but not ddev.com
How This PR Solves The Issue
Astro uses the astro-expressive-code plugin which provides that functionality.
https://github.com/expressive-code/expressive-code/blob/main/packages/astro-expressive-code/README.md
The image below is taken from this blog
https://ddev.com/blog/amd64-on-apple-silicon-ddev/