Skip to main content

Migrate Ghost blog exports and live sites to Git-versioned Markdown configured for Docfx static site generation.

Total Downloads
2.3K
2,262
Published
Aug 13, 2026
2mo ago

Get Started

dotnet add package GhostFx --version 0.4.5

No framework information available.

README

GhostFx

GhostFx Logo

Live-migrate Ghost blogs & JSON exports to git-versioned
markdown files configured for DocFX static site generation.

.NET 10.0 License: MIT NuGet version NuGet downloads


πŸš€ Key Features

  • πŸ‘» Live Ghost Admin & Content API Integration: Connect to live Ghost instances using JWT-authenticated Admin API keys or public Content API keys to extract posts, pages, tags, and drafts.
  • πŸ“¦ Offline JSON Export & Stdin Piping: Parse local Ghost database JSON exports (sample-ghost-export.json) or pipe JSON directly via standard input (stdin).
  • πŸ“ Markdown & Front-Matter Engine: Converts Ghost HTML posts into clean Markdown files with YAML front-matter (uid, title, slug, date, tags, metaTitle, metaDescription, image, og_title, og_description).
  • πŸ“š DocFX Static Site Builder Integration: Automatically generates docfx.json, index.md, toc.yml, and tag index pages organized into clean subfolders (published/, pages/, draft/, scheduled/, content/images/).
  • 🎨 Theme Conversion: Convert active Ghost themes (ZIP archives or unzipped folders) directly into DocFX modern theme overrides (public/main.css, public/main.js).
  • 🀫 Quiet Mode & Cross-Platform Pipe Workflows: Run silently with --quiet / -q or pipe input/output streams cleanly across Windows, Linux, and macOS.
  • ⚑ Built on .NET 10 & SLNX: High-performance, cross-platform CLI powered by .NET 10 and modern .slnx solution architecture.

πŸ“¦ Installation

Quick Run via dnx

Run ghostfx instantly without global installation:

dnx ghostfx [options]

Global Tool Installation

Pack and install ghostfx as a global .NET CLI tool:

dotnet tool install --global GhostFx

Or build and install locally from source:

dotnet pack GhostFx.Cli/GhostFx.Cli.csproj
dotnet tool install --global --add-source ./GhostFx.Cli/nupkg GhostFx

πŸ› οΈ Usage

Quick Start with Configuration File

Create a ghostfx.json configuration file in your directory:

{
  "ghostUrl": "https://myblog.ghost.io",
  "adminApiKey": "YOUR_KEY_ID:YOUR_KEY_SECRET",
  "contentApiKey": "YOUR_CONTENT_API_KEY",
  "ghostExportJson": "sample-ghost-export.json",
  "outputDir": "articles",
  "indexFile": "index.md",
  "siteTitle": "My Static DocFX Site",
  "includeDrafts": false,
  "downloadTheme": false,
  "themePath": "ghostfx.zip",
  "cleanUrls": false,
  "migrateTheme": true,
  "googleAnalyticsTag": "G-XXXXXXXXXX",
  "quiet": false
}

Run the migration:

ghostfx

CLI Command Options & Pipe Workflows

Override or supply all migration settings directly via CLI flags or piped streams:

# Migrate from a live Ghost instance using shorthands
ghostfx -u "https://myblog.ghost.io" -k "ID:SECRET" -o "articles" --site-title "My Tech Blog" -y

# Migrate from a local Ghost JSON export
ghostfx -i "./sample-ghost-export.json" -o "articles" --include-drafts true

# Quiet mode execution with custom config file
ghostfx -c "./configs/my-ghostfx-config.json" -q

# Pipe JSON export directly via stdin
cat sample-ghost-export.json | ghostfx -q -o sample_output -y
CLI Flags Reference
Option Shorthand Description Default
--config <path> -c Path to custom ghostfx.json configuration file ghostfx.json
--url <url> -u Live Ghost blog base URL β€”
--admin-api-key <key>, --api-key <key> -k Ghost Admin API key (ID:SECRET) β€”
--content-api-key <key> Ghost Content API key β€”
--input <path> -i Path to offline Ghost JSON export file β€”
--output <dir> -o Target output directory for Markdown posts articles
--index-file <file> Path for generated homepage Markdown file index.md
--site-title <title> Title of static site My Migrated Ghost Blog
--include-drafts Process draft posts in addition to published posts false
--clean-urls Generate {slug}/index.md for clean URLs false
--logo-path Generate _appLogoPath in docfx.json true
--ga-tag <tag> Google Analytics Tag ID to inject into docfx.json β€”
--download-theme Download active Ghost theme false
--theme-path <path> -t Path to theme ZIP archive or unzipped theme folder β€”
--migrate-theme Convert Ghost theme to DocFX theme override true
--purge-template Purge existing template output directory before migration β€”
--yes -y Non-interactive automatic confirmation false
--quiet -q Quiet mode (suppresses banners and progress animations) false

πŸ“ Output Directory Structure

Generated static site source files are organized under outputDir:

<outputDir>/
β”œβ”€β”€ docfx.json
β”œβ”€β”€ index.md
β”œβ”€β”€ tags.md
β”œβ”€β”€ toc.yml
β”œβ”€β”€ author/            # Ghost authors
β”‚   └── author-slug.md
β”œβ”€β”€ content/
β”‚   └── images/        # Backwards-compatible Ghost media & brand assets
β”‚       └── 2024/05/sample.jpg
β”œβ”€β”€ draft/             # Draft posts
β”‚   └── draft-slug.md
β”œβ”€β”€ ghostfx/           # Converted DocFX modern theme overrides
β”‚   └── (theme files)
β”‚   └── index.html.primary.tmpl
β”œβ”€β”€ pages/             # Ghost pages
β”‚   └── page-slug.md
β”œβ”€β”€ published/         # Published posts
β”‚   └── post-slug.md
β”œβ”€β”€ scheduled/         # Scheduled posts (optional)
β”‚   └── post-slug.md
└── tags/              # Ghost tags
    └── tag-slug.md

πŸ—οΈ Repository Architecture

GhostFx is organized into modular .NET 10 projects:

GhostFx/
β”œβ”€β”€ GhostFx.slnx           # Modern XML solution file (.NET 10)
β”œβ”€β”€ GhostFx.Core/          # Core library (MigrationEngine, GhostAdminClient, DocfxGenerator, MarkdownConverter)
β”œβ”€β”€ GhostFx.Cli/           # Command-line entrypoint powered by System.CommandLine
└── GhostFx.Tests/         # xUnit unit test suite

Developer Workflow

# Build solution
dotnet build GhostFx.slnx

# Run tests
dotnet test GhostFx.slnx

# Execute CLI locally
dotnet run --project GhostFx.Cli/GhostFx.Cli.csproj -- --help

πŸ“„ License

This project is licensed under the MIT License.

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.