@plugdash/fromsubstack

Pure infrastructure

Bring your Substack archive with you.

320 words·2min read

Registers Substack as a source in EmDash's admin importer. Upload the export ZIP from Substack's Settings > Exports, and it reads posts.csv plus each post's HTML, converts bodies to Portable Text, and reports images so EmDash can bring them in too. Paid and draft posts are flagged in metadata, not hidden.

npm install @plugdash/fromsubstack
alphaGitHub
js
import { fromsubstackPlugin } from "@plugdash/fromsubstack"
// in emdash plugins array:
fromsubstackPlugin({ targetCollection: "posts", status: "draft" })

No UI. Pure infrastructure.

Setup

  1. Install and register

    bash
    npm install @plugdash/fromsubstack
    js
    import { fromsubstackPlugin } from "@plugdash/fromsubstack"
    // in emdash plugins array:
    fromsubstackPlugin({ targetCollection: "posts", status: "draft" })

After this, "Substack" appears as a source in EmDash's admin importer. Upload the export ZIP there - there's no separate CLI step.

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

Config options

optiontypedefaultdescription
targetCollectionstring"posts"Collection posts import into
status"draft" | "published""draft"Status for posts Substack had marked published (a post still a draft on Substack always imports as a draft)
importImagesbooleantrueReport body images so EmDash imports them
preserveSlugsbooleantrueKeep the slug from the Substack post URL instead of re-slugifying the title
onWarn(message: string) => voidconsole.warnWhere per-post warnings (skips, empty bodies) go
built with plugdash.dev