@plugdash/sharepost

The EmDash alternative to AddToAny

Make sharing the obvious next step.

320 words·2min read

Generates correct share URLs for Twitter/X, LinkedIn, WhatsApp, Bluesky, and email on every publish. Renders as circular icon buttons - no JavaScript libraries, no tracking scripts, no 200KB payloads. Four variants. Looks right on day one.

npm install @plugdash/sharepost
beta GitHub
circle pill

This is the default. No configuration.

Setup

  1. Install and register

    npm install @plugdash/sharepost
    import sharepost from "@plugdash/sharepost"
    // in emdash plugins array:
    sharepost({ via: "abhinavs" })
  2. Add to your layout

    import ShareButtons from "@plugdash/sharepost/ShareButtons.astro"
    
    <ShareButtons post={post} />

After this, every published post has share URLs ready. Add the component once - every new post picks it up automatically.

It looks right. But it's yours to change.

Props

proptypedefaultdescription
post EmDash content item Required
variant "circle" | "pill" | "inline" | "minimal" "circle" Visual style
platforms array ["twitter","linkedin","bluesky"] Which networks to show

CSS custom properties

tokendescription
--plugdash-share-gap Space between buttons
--plugdash-share-padding Button padding
--plugdash-share-radius Button radius

Components are intentionally simple. Copy src/ShareButtons.astro into your theme and modify freely - no upstream coupling.

Pairs well with

share and heart are two different signals. Most readers do one or the other. Give them both.

heartpost

alpha

The simplest signal readers can send. Show them you counted it.

npm install @plugdash/heartpost

readtime

beta

Readers decide in three seconds. Give them a reason to stay.

npm install @plugdash/readtime
built with plugdash