ghost-detect
v1.0.14
Published
Detect whether a site has been generated by the Ghost publishing platform.
Downloads
15
Readme
ghost-detect
Detect whether a site has been generated by the Ghost publishing platform.
Install
~ ❯❯❯ npm install --save ghost-detect
Usage
const ghostDetect = require('ghost-detect');
ghostDetect('nikolaskama.me').then(ghost => {
console.log(ghost);
//=> true
});
ghostDetect('google.com').then(ghost => {
console.log(ghost);
//=> false
});
API
ghostDetect(targets, [options])
Returns a Promise
for a boolean
which is true
if any of the targets
have been generated using the Ghost publishing platform.
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.
options
timeout
Type: number
Timeout in milliseconds after which a request is considered failed. Default: 5000
.
Related
- ghost-detect.now - A minimal service to check whether a site has been generator by the Ghost publishing platform.
License
MIT © Nikolaos Kamarinakis