meaganewaller / web

frontend for my developer blog
https://devblog-web.vercel.app
MIT License
0 stars 0 forks source link

Improve Code Blocks in Blog Posts #2

Closed meaganewaller closed 7 months ago

meaganewaller commented 7 months ago

As a reader of the blog, I want to easily copy code blocks from blog posts to my clipboard, So that I can use the code in my own projects without having to manually type it.

Acceptance Criteria:

  1. View Code Block: When I read a blog post containing a code block, I should be able to easily identify it within the post.
  2. Copy Button: Next to each code block, there should be a clearly labeled button or icon indicating the option to copy the code to my clipboard.
  3. Copy Functionality: When I click the "Copy" button associated with a code block, the content of that code block should be copied to my clipboard.
  4. Feedback on Copy: Upon clicking the "Copy" button, I should receive visual feedback confirming that the code has been successfully copied to my clipboard.
  5. Language Identification: The code block should include information about the language of the code, making it easier for me to understand its context and syntax.
  6. Filename Display: If applicable, the code block should display the filename or a relevant identifier to provide additional context about the code snippet.
    1. Consistent Experience: The copy functionality and code block appearance should be consistent across different blog posts, ensuring a seamless user experience.

Additional Notes: