This NodeJS module will help you to export Jekyll markdown posts to a format that can be easily imported to Ghost Blog Platform.
It doesn't handle static pages, and it doesn't do anything with images. You'll have to copy those over yourself and manually adjust any URL differences.
This was built by reverse-engineering the version of Wordpress plugin and Ghost schema to match the JSON file it outputs.
Clone/download the repository then place your Jekyll posts into posts
folder or create a folder in the root level with your Jekyll posts.
Your post should be on YAML format (which is Jekyll default format).
To install dependencies
sudo npm install
To start to export
node index.js ./path/to/jekyll/posts
Type the name of the folder.. wait for the magic happen. If everything went fine you should get this message
Ghost JSON generated successfully!
And a file called ghost-generated.json
was created on your folder.
After do the steps above boot up your Ghost platform.
npm start
Go to the url http://localhost:2368/ghost/debug/
import the file generated nodejs-jekyll-to-ghost called ghost-generated.json
That's it.. Now you should have migrated your posts to Ghost format and ready to begin blog on your new Ghost blog platform.
ps: I removed all test posts on Ghost blog before migrate my Ghost generated format.
git checkout -b my-new-branch
git commit -am 'fix stuff'
git push origin my-new-branch
The MIT License (MIT)
Copyright (c) 2014 Michael Lancaster
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.