@plugdash/fromsubstack
Pure infrastructure
Bring your Substack archive with you.
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.
import { fromsubstackPlugin } from "@plugdash/fromsubstack"
// in emdash plugins array:
fromsubstackPlugin({ targetCollection: "posts", status: "draft" })No UI. Pure infrastructure.
Setup
Install and register
npm install @plugdash/fromsubstackimport { 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
| option | type | default | description |
|---|---|---|---|
targetCollection | string | "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) |
importImages | boolean | true | Report body images so EmDash imports them |
preserveSlugs | boolean | true | Keep the slug from the Substack post URL instead of re-slugifying the title |
onWarn | (message: string) => void | console.warn | Where per-post warnings (skips, empty bodies) go |