@plugdash/fromghost
Pure infrastructure
Bring your Ghost site over without leaving the admin.
Registers a Ghost source in EmDash's own import screen, next to the built-in WordPress importers. Upload the JSON export from Ghost's Settings > Labs, and it reads posts, pages, tags, and authors, converts post bodies to Portable Text, and resolves feature images so EmDash's own pipeline can download them.
import { fromghostPlugin } from "@plugdash/fromghost"
// in emdash plugins array:
fromghostPlugin({ siteUrl: "https://yourghostsite.com" })No UI. Pure infrastructure.
Setup
Install and register
npm install @plugdash/fromghostimport { fromghostPlugin } from "@plugdash/fromghost" // in emdash plugins array: fromghostPlugin({ siteUrl: "https://yourghostsite.com" })
After this, "Ghost Export File" appears as a source in EmDash's admin import screen. Upload the export 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 suggested for Ghost posts in the import UI |
preserveSlugs | boolean | true | Keep Ghost's slugs instead of regenerating from the title |
importImages | boolean | true | Carry feature and inline images over |
importTags | boolean | true | Carry Ghost tags over as taxonomy terms |
siteUrl | string | "" | The Ghost site's URL, to resolve __GHOST_URL__ image paths |
onWarn | (message: string) => void | discard | Called for every recoverable problem during import |