Avatar

Embed Components

This page is the first pass at bringing the antfu.me embedding workflow into this site: keep the page itself in Markdown, then drop in small Vue components only when the content actually benefits from richer presentation.

Use AppLink for links that might be internal or external. Internal links stay on the router, external links open in a new tab.

TextCopy

TextCopy is useful for shell commands, package names, route paths, handles, or any small chunk of text that readers are likely to reuse.

pnpm add @vueuse/core
https://pi-dal.com/embeds

GitHubRepoCard

For projects, tools, and references, a repo card carries more weight than a plain inline link.

GitHub Repository

antfu.me

antfu/antfu.me

Reference

Anthony Fu's personal website, built around Markdown content plus embedded Vue components.

Open repository

GitHub Repository

nuxt-xlog-website

pi-dal/nuxt-xlog-website

Current

This site. A Vite + Vue 3 + vite-ssg stack that is now getting a reusable embeds layer.

Open repository

YouTubeEmbed

When the article needs a real video instead of a plain link, embed it directly and keep the surrounding prose short.

BilibiliEmbed

The same pattern applies to Bilibili so Chinese-language content can stay first-class instead of being pushed out to a plain hyperlink.

Why This Matters

This is the pattern worth learning from antfu.me:

  • Markdown remains the default authoring surface.
  • Components are small, focused, and content-driven.
  • Rich embeds stay reusable instead of being rewritten per post.
  • Heavier interactive demos can come later, once the lightweight embed layer is solid.
CC BY-NC-SA 4.0 2020-PRESENT © pi-dal