FTP deployer plugin for http://hexo.io/
npm install hexo-deployer-jsftp --save
Set deploy.type
to ftp
in _config.yml
.
deploy:
type: ftp
Add connection
and root
to deploy
in _config.yml
.
deploy:
type: ftp
connection:
host: <ftp host>
port: <ftp port>
user: <ftp user>
password: <ftp password>
...
root: <path/to/your/blog/on/the/server>
Connection properties:
-
host - string - The hostname or IP address of the FTP server. Default: 'localhost'
-
port - integer - The port of the FTP server. Default: 21
-
secure - mixed - Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990) Default: false
-
secureOptions - object - Additional options to be passed to
tls.connect()
. Default: (none)- Additionally you can add pfxPath, keyPath, caPath and certPath to specify the path of the file that contains data. This parameters are overrides existing ones.
-
user - string - Username for authentication. Default: 'anonymous'
-
password - string - Password for authentication. Default: 'anonymous@'
-
connTimeout - integer - How long (in milliseconds) to wait for the control connection to be established. Default: 10000
-
pasvTimeout - integer - How long (in milliseconds) to wait for a PASV data connection to be established. Default: 10000
-
keepalive - integer - How often (in milliseconds) to send a 'dummy' (NOOP) command to keep the connection alive. Default: 10000
Type deploy command in console.
hexo deploy [host=<ftp host>] [port=<ftp port>] [user=<ftp user>] [password=<ftp password>]
Command line parameters overrides the default configuration.
Remove ftp
value from deploy.type
in _config.yml
.
deploy:
type:
Execute the following command.
npm update
Execute the following command. Don't forget to disable the plugin before uninstalling.
npm uninstall hexo-deployer-jsftp