added public_dir variable (available in the next release of hexo)
This commit is contained in:
4
index.js
4
index.js
@@ -1,5 +1,7 @@
|
|||||||
var spawn = require('child_process').spawn;
|
var spawn = require('child_process').spawn;
|
||||||
|
|
||||||
|
var public_dir = hexo.config.public_dir || './public';
|
||||||
|
|
||||||
// run function which supports interactive commands
|
// run function which supports interactive commands
|
||||||
function run (command, args, callback) {
|
function run (command, args, callback) {
|
||||||
process.stdin.pause();
|
process.stdin.pause();
|
||||||
@@ -38,7 +40,7 @@ hexo.extend.deployer.register('ftp', function (args, callback) {
|
|||||||
|
|
||||||
var args = [
|
var args = [
|
||||||
'-e',
|
'-e',
|
||||||
'mirror -R --ignore-time --delete -v ./public ' + config.root + '; bye',
|
'mirror -R --ignore-time --delete -v ' + public_dir + ' ' + config.root + '; bye',
|
||||||
'-u',
|
'-u',
|
||||||
config.user,
|
config.user,
|
||||||
config.host
|
config.host
|
||||||
|
|||||||
Reference in New Issue
Block a user