{"id":15048519,"url":"https://github.com/miriswisdom/md2ghost","last_synced_at":"2025-08-18T05:41:17.908Z","repository":{"id":219831428,"uuid":"750044149","full_name":"MirisWisdom/MD2Ghost","owner":"MirisWisdom","description":"Quickly publish Markdown files to Ghost CMS in bulk.","archived":false,"fork":false,"pushed_at":"2024-01-29T22:01:35.000Z","size":8,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T03:59:41.855Z","etag":null,"topics":["batch","ghost-blog","markdown","md","pandoc","publish","script"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MirisWisdom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-01-29T21:59:56.000Z","updated_at":"2025-01-16T15:12:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"1df35686-1698-4b2e-8374-f787517ed9aa","html_url":"https://github.com/MirisWisdom/MD2Ghost","commit_stats":null,"previous_names":["miriswisdom/md2ghost"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MirisWisdom/MD2Ghost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MirisWisdom%2FMD2Ghost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MirisWisdom%2FMD2Ghost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MirisWisdom%2FMD2Ghost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MirisWisdom%2FMD2Ghost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MirisWisdom","download_url":"https://codeload.github.com/MirisWisdom/MD2Ghost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MirisWisdom%2FMD2Ghost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270951111,"owners_count":24674002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"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":["batch","ghost-blog","markdown","md","pandoc","publish","script"],"created_at":"2024-09-24T21:13:39.919Z","updated_at":"2025-08-18T05:41:17.875Z","avatar_url":"https://github.com/MirisWisdom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Markdown to Ghost CMS\n\n## Introduction\n\nThis rather pragmatic script will publish your set of Markdown files to a [Ghost CMS](https://ghost.org/) instance. This project is especially useful when migrating/importing data into Ghost, or when drafting multiple Markdown files offline.\n\nThe script operates by traversing the `data` directory, with the expectation that:\n\n1. Each sub-directory represents a tag for Ghost (e.g. `tech`, `health`); and\n2. Markdown files within those sub-directories represent individual blog posts.\n\nThe file name of the Markdown file is used as the title, and the contents are used for the body. The contents will be converted to HTML using Pandoc.\n\n```\ndata\n└── test\n    └── Hello World.md\n    └── Another Test Post.md\n└── health\n    └── How to Blink.md\n    └── How to Breathe.md\n```\n\n## Prerequisites\n\nBefore running the script, ensure you have the following:\n\n- Node.js installed on your machine, as the script has been bittersweetly written in JavaScript.\n- The required npm packages installed. Run the following command to install them:\n\n  ```bash\n  npm install @tryghost/admin-api dotenv\n  ```\n\n- Pandoc installed for Markdown to HTML conversion.\n\n## Setup\n\n1. Clone this repository to your local machine.\n2. Copy the `.env.example` file to `.env` file in the root directory, and revise the values accordingly:\n\n   ```env\n   GHOST_API_URL=https://your-ghost-site.com\n   GHOST_ADMIN_API_KEY=your-ghost-admin-api-key\n   POST_STATUS=draft\n   ```\n\n   Replace `https://your-ghost-site.com` and `your-ghost-admin-api-key` with your Ghost CMS site URL and admin API key. Using `POST_STATUS`, you can specify whether the posts should be submitted as `draft` or be `published` immediately.\n\n3. Populate the `data` directory with sub-directories representing tags, each containing Markdown files for blog posts.\n\n## Usage\n\nSimply run the script using the following command:\n\n```bash\nnode md2ghost.js\n```\n\n## Configuration\n\nAdjust the script's behavior by modifying the environment variables in the `.env` file:\n\n| Variable              | Description                                                           |\n| --------------------- | --------------------------------------------------------------------- |\n| `GHOST_API_URL`       | The URL of your Ghost CMS site.                                       |\n| `GHOST_ADMIN_API_KEY` | Your Ghost admin API key.                                             |\n| `POST_STATUS`         | (Optional) Set the default status for posts (\"published\" or \"draft\"). |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiriswisdom%2Fmd2ghost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiriswisdom%2Fmd2ghost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiriswisdom%2Fmd2ghost/lists"}