Deploying a nikola site to FTP
| asmw
If you want to generate a static website using the Nikola but need to deploy to a hoster who only provides FTP you can use ncftp to automate the process.
- Install
ncftp. On Debian-based distributionsapt install ncftpshould work -
Save you server credentials to a bookmark so they do no appear in your nikola config
- Log in to the FTP server:
ncftp -u <username> ftp.ftp_server.com - Create a bookmark:
bookmark <bookmark name> - Confirm whether you want to save your password or not
- Quit
- Log in to the FTP server:
-
Add a deploy configuration to you
conf.py:
DEPLOY_COMMANDS = { 'ftp': [ "ncftpput -R <bookmark name> / output/*", ] }
- Run
nikola deploy ftp