Embedding Demos and Linking in Posts
How I add live demos, YouTube clips, and styled links to blog posts on this site.
Links, internal and external
Plain [text](url) still works — but external links now open in a new tab with a small ↗ glyph, and internal links route through Next.js for fast navigation. See the home page or my GitHub for examples.
Embedded YouTube
Drop a YouTube embed URL straight into the post:
The wrapper preserves 16:9 aspect ratio, lazy-loads the iframe, and only grants sensible permissions.
A live Hugging Face Space
For AI projects I often embed the running space so readers can poke at it without leaving the post. Use a taller height for app-style demos:
Smaller, fixed-height embeds
That's the whole API — write MDX as usual, and the custom a and iframe components take it from there.