Retrieve which version of the Ghost publishing platform a site is using.
~ ❯❯❯ npm install --save ghost-version
const ghostVersion = require('ghost-version');
ghostVersion('nikolaskama.me').then(ghost_version => {
console.log(ghost_version);
//=> '1.19'
});
ghostVersion('google.com').then(ghost_version => {
console.log(ghost_version);
//=> 'Target doesn\'t seem to be using Ghost'
});
Returns a Promise
for the version of Ghost of the targets
.
Type: string
Array
One or more targets to check. Can either be a full URL like https://hostname
or just hostname
. When the protocol is missing from a target http
is assumed.
Type: number
Timeout in milliseconds after which a request is considered failed. Default: 5000
.
MIT © Nikolaos Kamarinakis