AndrewUsher / AndrewUsher/andrewusher.dev
Improve code block UX with share and open in playground
- Langage dominant
- TypeScript
- Étoiles
- 1
- Forks
- 0
- Merge moyen
- 2 j 5 h
- PR mergées (30 j)
- 59
Description
The copy button script in src/layouts/BaseLayout.astro:58 works, but it's the only thing we have for a site that writes a lot about code.
Upgrade:
- keep the copy button but add a toast ("Copied") instead of just swapping the icon
- add filename tab when markdown has a title, and show language label
- add "Open in StackBlitz" for runnable examples — reuse the Cookie Store and Durable Streams demos in src/components/blog/* as patterns
- track most-copied blocks with a simple event to PostHog/Plausible so I know what's useful
- make sure it still works after astro:page-load transitions and with keyboard users
No need to rewrite syntax highlighting. Shiki config in astro.config.mjs:62 stays as is. Just the wrapper around pre.astro-code.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.