{"id":50913198,"url":"https://github.com/p4suta/ghost-migrate","last_synced_at":"2026-06-16T12:02:22.802Z","repository":{"id":342831077,"uuid":"1175325838","full_name":"P4suta/ghost-migrate","owner":"P4suta","description":"Complete Ghost CMS migration tool with media resolution and Hugo Page Bundle output","archived":false,"fork":false,"pushed_at":"2026-03-07T15:53:40.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-07T21:41:47.674Z","etag":null,"topics":["clean-architecture","cli","ghost-cms","go","hugo","markdown","migration","migration-tool","static-site-generator"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/P4suta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-07T15:00:05.000Z","updated_at":"2026-03-07T15:53:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/P4suta/ghost-migrate","commit_stats":null,"previous_names":["p4suta/ghost-migrate"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/P4suta/ghost-migrate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4suta%2Fghost-migrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4suta%2Fghost-migrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4suta%2Fghost-migrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4suta%2Fghost-migrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/P4suta","download_url":"https://codeload.github.com/P4suta/ghost-migrate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4suta%2Fghost-migrate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34404748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean-architecture","cli","ghost-cms","go","hugo","markdown","migration","migration-tool","static-site-generator"],"created_at":"2026-06-16T12:02:20.749Z","updated_at":"2026-06-16T12:02:22.796Z","avatar_url":"https://github.com/P4suta.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ghost-migrate\n\nA CLI tool for complete migration from Ghost CMS. Parses Ghost JSON exports into Markdown files and resolves media from Ghost Support backup archives (ZIP or directory), outputting Hugo Page Bundle-compatible directory structures.\n\nWithout `--media`, it falls back to flat Markdown output (ghost-to-md compatible).\n\n## Installation\n\n```bash\ngo install ghost-migrate/cmd/ghost-migrate@latest\n```\n\nOr build from source:\n\n```bash\nmake build\n# Binary at bin/ghost-migrate\n```\n\n## Usage\n\n```bash\n# Flat Markdown (ghost-to-md compatible)\nghost-migrate export.json\n\n# Hugo Page Bundles with media from ZIP backup\nghost-migrate --media backup.zip export.json\n\n# Hugo Page Bundles with media from extracted directory\nghost-migrate --media ./backup-dir export.json\n\n# Dry-run to preview the migration plan\nghost-migrate --media backup.zip --dry-run export.json\n\n# Filter by status\nghost-migrate --status published export.json\n```\n\n### Flags\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--media \u003cpath\u003e` | | ZIP or directory of Ghost media backup |\n| `--output \u003cpath\u003e` | `./output` | Output directory |\n| `--status \u003cfilter\u003e` | | Filter by post status (published/draft/scheduled) |\n| `--include-pages` | `true` | Include pages in output |\n| `--internal-tags` | `false` | Include internal tags (#-prefixed) in front matter |\n| `--discard-orphaned` | `false` | Discard unreferenced media instead of saving to `_orphaned/` |\n| `--dry-run` | `false` | Show migration plan without writing files |\n| `--yes` | `false` | Skip confirmation prompt |\n| `--verbose` | `false` | Enable debug logging |\n\n## Output Structure\n\n### With `--media` (Page Bundle mode)\n\n```\noutput/\n  my-post/\n    index.md          # Markdown with front matter\n    photo.jpg         # Referenced media\n    cover.jpg         # Feature image\n  another-post/\n    index.md\n  _orphaned/          # Unreferenced media files\n    unused.jpg\n  manifest.json       # Journal for crash recovery\n```\n\n### Without `--media` (Flat mode)\n\n```\noutput/\n  my-post.md\n  another-post.md\n```\n\n## Architecture\n\nClean Architecture with strict dependency direction:\n\n```\ncmd/ghost-migrate/     CLI entry point, manual DI\ninternal/\n  domain/              Pure Go types and business logic\n  port/                Interfaces (ExportReader, ContentConverter, MediaStore, etc.)\n  adapter/             Implementations\n    ghostjson/         Ghost JSON parser\n    htmlconv/          HTML-to-Markdown with Ghost card support\n    mediafs/           Directory-based media store\n    mediazip/          ZIP-based media store (streaming)\n    fsbundle/          Page Bundle file writer\n    fsjournal/         Journal persistence\n  usecase/             Two-phase migration orchestrator\n```\n\n### Two-Phase Execution\n\n1. **Analysis** (read-only): Parse JSON, index media, extract references, detect shared/orphaned files, build migration plan\n2. **Execution**: Write bundles, copy media, track operations in journal for crash recovery\n\n## Development\n\n```bash\nmake build              # Build binary\nmake test               # Run tests with race detector\nmake lint               # go vet + gofmt check\nmake clean              # Remove build artifacts\nmake update-golden      # Update golden test files\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4suta%2Fghost-migrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp4suta%2Fghost-migrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4suta%2Fghost-migrate/lists"}