Hexo Deployment

Deployment
Hexo provides a fast and easy way for deployment. You only need one command to deploy your site to servers.

$ hexo deploy
Before we start, you have to modify settings in _config.yml. A valid deployment setting must come with type field. For example:

deploy:
type: git
You can use multiple deployers. Hexo will execute each deployer in sequence.

deployer:
– type: git
repo:
– type: heroku
repo:
Git
Install hexo-deployer-git.

$ npm install hexo-deployer-git –save
Edit settings.

deploy:
type: git
repo:
branch: [branch]
message: [message]
Option Description
repo GitHub repository URL
branch Branch name. The deployer will detect branch automatically if you are using GitHub or GitCafe.
message Customize commit message (Default to Site updated: {{ now(“YYYY-MM-DD HH:mm:ss”) }})
Heroku
Install hexo-deployer-heroku.

$ npm install hexo-deployer-heroku –save
Edit settings.

deploy:
type: heroku
repo:
message: [message]
Option Description
repo, repository Heroku repository URL
message Customize commit message (Default to Site updated: {{ now(“YYYY-MM-DD HH:mm:ss”) }})
Rsync
Install hexo-deployer-rsync.

$ npm install hexo-deployer-rsync –save
Edit settings.

deploy:
type: rsync
host:
user:
root:
port: [port]
delete: [true|false]
verbose: [true|false]
ignore_errors: [true|false]
Option Description Default
host Address of remote host
user Username
root Root directory of remote host
port Port 22
delete Delete old files on remote host true
verbose Display verbose messages true
ignore_errors Ignore errors false
OpenShift
Install hexo-deployer-openshift.

$ npm install hexo-deployer-openshift –save
Edit settings.

deploy:
type: openshift
repo:
message: [message]
Option Description
repo OpenShift repository URL
message Customize commit message (Default to Site updated: {{ now(“YYYY-MM-DD HH:mm:ss”) }})
FTPSync
Install hexo-deployer-ftpsync.

$ npm install hexo-deployer-ftpsync –save
Edit settings.

deploy:
type: ftpsync
host:
user:
pass: remote: [remote]
port: [port]
ignore: [ignore]
connections: [connections]
verbose: [true|false]
Option Description Default
host Address of remote host
user Username
pass Password
remote Root directory of remote host /
port Port 21
ignore Ignore the files on either host or remote
connections Connections number 1
verbose Display verbose messages false
Other Methods
All generated files are saved in public folder. You can copy it to wherever you like.

10 thoughts on “Hexo Deployment

  1. That is very attention-grabbing, You’re an overly skilled blogger.
    I’ve joined your feed and look forward to searching for more of your magnificent post.

    Also, I’ve shared your website in my social networks

  2. We are looking for experienced people that might be interested in from working their home on a part-time basis. If you want to earn $100 a day, and you don’t mind writing some short opinions up, this might be perfect opportunity for you!

Leave a Reply

Your email address will not be published. Required fields are marked *