Get Started
No framework information available.
README
GhostFx

Live-migrate Ghost blogs & JSON exports to git-versioned
markdown files configured for DocFX static site generation.
π 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/-qor pipe input/output streams cleanly across Windows, Linux, and macOS. - β‘ Built on .NET 10 & SLNX: High-performance, cross-platform CLI powered by
.NET 10and modern.slnxsolution 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.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.