Skip to content
CelPlume
↑↓select·Enteropen·EscclosePowered by Pagefind
ZH
On this page

Cards

Link cards — the plain card()/cards() grid, GitHub repository cards and Bilibili video link cards.

card() builds a single card; cards() wraps any number of them in the Plumest-style responsive grid. For rich link cards — repositories and videos — use GitHubCard / BilibiliCard below.

cards([
{ title: 'Markdown authoring', description: 'Write docs in plain Markdown.', href: '/guides/example/', icon: 'lucide:file-text' },
{ title: 'Component gallery', description: 'Every kit builder, live.', href: '/contribution/components/', icon: 'lucide:zap' },
{ title: 'Design tokens', description: 'The single source of truth.', href: '/contribution/styles/', icon: 'lucide:palette' },
]);
Card without icon

Plain card

No icon, no link — a bare block.

Extra HTML content inside.

card({ title: 'Getting started', description: 'A card that links somewhere.', href: '/guides/example/', icon: 'lucide:arrow-right' });
card({ title: 'Plain card', description: 'No icon, no link — a bare block.', children: '<p>Extra HTML content inside.</p>' });
card({ title: 'Plumest', description: 'External links open in a new tab.', href: 'https://GitHub.com/CelPlume/CelestPlume', external: true, icon: 'lucide:external-link' });
title*string
Card title.
descriptionstring
Supporting text.
Default''
hrefstring
Target URL — with it the card renders as an <a>.
Default''
externalboolean
Opens the link in a new tab.
Defaultfalse
iconstring
Iconify name (e.g. lucide:zap) or raw SVG.
Default''
childrenstring
Extra HTML below the description.
Default''
  • Icons resolve via the project’s local @iconify-json sets — never fetched from the Iconify API at runtime.
  • cards() accepts an array of CardOptions or a single pre-built HTML string.

GitHubCard renders one GitHub repository card per usage — the whole card is a link and the title shows owner/repo. Metadata (description, language) and star/fork counts are fetched from the GitHub API at build time, then refreshed in the browser. Repeat the component for multiple repositories.

CelPlume/CelestPlumeOther00 CelPlume/BookmarkHarborOther00
---
import GitHubCard from '../../../../components/kit/GitHubCard.astro';
---
<GitHubCard owner="CelPlume" repo="CelestPlume" />
<GitHubCard owner="CelPlume" repo="BookmarkHarbor" />
owner*string
Repository owner (user or organization).
repo*string
Repository name.
targetstring
Link target for the repository URL.
Default'_blank'
authstring
GitHub token for the build-time request.
Default''

Notes:

  • The whole card links to the repository; the title shows owner/repo.
  • Build-time data comes from the GitHub REST API; a failed request renders a plain link card.
  • Star/fork counts and missing metadata refresh in the browser and are cached in localStorage to respect the API rate limit.
  • Requires network access to api.github.com at build and runtime.

BilibiliCard renders a Bilibili video as a link card with cover, title, description and the uploader. Metadata is fetched from the Bilibili view API at build time; a failed request degrades to a plain link card.

2:44百万级装备试听California Dreamin' - The Mamas & the Papas【Hi-Res】作词 : Michelle Gilliam/M.Gilliam/Michele Gilliam/John Phillips 作曲 : Michelle Gilliam/M.Gilliam/Michele Gilliam/John Phillips 音响:天朗皇家西敏寺 Westminster Royal GR 功放:麦景图 录音MIC:U87 2支, 纽曼149 2支 录音设备:SSL+ ProtoolsJLRS日落fmBilibili
---
import BilibiliCard from '../../../../components/kit/BilibiliCard.astro';
---
<BilibiliCard bvid="BV1DN411r7co" />
bvid*string
Bilibili video ID (BV…).
targetstring
Link target for the video URL.
Default'_blank'

Notes:

  • The cover, avatar and external-link arrow use referrerpolicy="no-referrer" so the Bilibili CDN serves images to the docs site.
  • Invalid bvid values fail the build with a clear error.
  • For the playable embed, see Embed Media.