@plugdash/shortlink
The EmDash alternative to Pretty Links
Every post, one clean URL to copy.
Auto-generates short URLs for published posts, stored in Cloudflare KV. Ships CopyLink.astro with three variants - circle, pill, inline. Green check on copy, resets in two seconds.
This is the default. No configuration.
Setup
-
Install and register
npm install @plugdash/shortlinkimport shortlink from "@plugdash/shortlink" // in emdash plugins array: shortlink({ autoCreate: true }) -
Add to your layout
import CopyLink from "@plugdash/shortlink/CopyLink.astro" <CopyLink post={post} />
After this, each published post gets a short URL automatically. The component copies it to the clipboard on click.
It looks right. But it's yours to change.
Props
| prop | type | default | description |
|---|---|---|---|
post | EmDash content item | Required | |
variant | "circle" | "pill" | "inline" | "circle" | Visual style |
CSS custom properties
| token | description |
|---|---|
--plugdash-copy-color | Icon colour |
--plugdash-copy-size | Button size |
Components are intentionally simple. Copy src/CopyLink.astro
into your theme and modify freely - no upstream coupling.
Pairs well with
copy link sits naturally alongside share and heart. Most readers use one of the three.