@plugdash/fromghost

Pure infrastructure

Bring your Ghost site over without leaving the admin.

320 words·2min read

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.

npm install @plugdash/fromghost
alphaGitHub
js
import { fromghostPlugin } from "@plugdash/fromghost"
// in emdash plugins array:
fromghostPlugin({ siteUrl: "https://yourghostsite.com" })

No UI. Pure infrastructure.

Setup

  1. Install and register

    bash
    npm install @plugdash/fromghost
    js
    import { 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

optiontypedefaultdescription
targetCollectionstring"posts"Collection suggested for Ghost posts in the import UI
preserveSlugsbooleantrueKeep Ghost's slugs instead of regenerating from the title
importImagesbooleantrueCarry feature and inline images over
importTagsbooleantrueCarry Ghost tags over as taxonomy terms
siteUrlstring""The Ghost site's URL, to resolve __GHOST_URL__ image paths
onWarn(message: string) => voiddiscardCalled for every recoverable problem during import
built with plugdash.dev