ghost-export
v2.0.0
Published
Exports a Ghost blog into a collection of Markdown files.
Downloads
6
Readme
ghost-export
Exports a Ghost blog into a collection of Markdown files.
Installation
$ npm install -g ghost-export
Usage
# Export published posts only
$ ghost-export /path/to/ghost/app /path/to/output
# Export drafts only
$ ghost-export --drafts /path/to/ghost/app /path/to/output
# Export all posts
$ ghost-export --all /path/to/ghost/app /path/to/output
Alternatively, you can require('ghost-export')
and use it in your own scripts. Example:
var GhostExport = require('ghost-export');
GhostExport({
source: '/path/to/ghost/app',
destination: '/path/to/output',
published: true, // optional, defaults to true
drafts: true // optional, defaults to false
}, function(err, count) {
if (err) { console.error(err); }
else { console.log('Exported ' + count + ' files.'); }
});
Testing
$ npm test
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request