Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ghost-static

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghost-static - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

19

bin/scrap.js
#!/usr/bin/env node
'use strict';
const scraper = require('website-scraper'), // Version 3+
const
scraper = require('website-scraper'),
rimraf = require('rimraf'),

@@ -9,3 +10,4 @@ fs = require('fs'),

url = require('url'),
isBinary = require('isbinaryfile');
isBinary = require('isbinaryfile'),
syncRequest = require('sync-request');

@@ -61,7 +63,3 @@ /**

urlFilter: url => {
const download = url.indexOf(ghostURL) === 0;
if (download) {
console.log(`Downloading ${url}`);
}
return download;
return url.indexOf(ghostURL) === 0;
},

@@ -86,3 +84,9 @@

})
},
httpResponseHandler: response => {
console.log(`Downloading ${response.request.href}`);
// Fetch items synchronously to avoid some handlebars-related bugs
const request = syncRequest('GET', response.request.href);
return Promise.resolve(request.getBody('utf8'));
}

@@ -120,2 +124,3 @@ };

console.log('Done!');
console.log(`Your static blog is stored in ${path.join(process.cwd(), staticFolder)}`)
});

@@ -122,0 +127,0 @@ }, 1000);

{
"name": "ghost-static",
"version": "0.1.3",
"version": "0.1.4",
"description": "A tool to convert you Ghost blog to a static website",

@@ -25,4 +25,5 @@ "main": "index.js",

"rimraf": "^2.6.1",
"sync-request": "^4.1.0",
"website-scraper": "^3.1.0"
}
}
# Ghost-static
Convert your dynamic Ghost blog to a static website.
This tool has been tested for Ghost 0.11. It works with Ghost 1.0.0-rc.1, but the floating-header does not appear.
This tool has been tested for Ghost 0.11 and Ghost 1.0.0-rc.1
This is a work in progress, some Ghost themes may not work correctly.

@@ -6,0 +7,0 @@ ## Installation

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc