One-click deployment of the hexo blog

It's up to github or coding with one click

up.sh

Before you do this, you need to make sure that you have configured SSH keys. If not, you can see the one-click SSH key generation tutorial, which was in the previous article.

You need to right-click git bash in the directory where the install.sh script is stored and run the following command:

source install.sh deploy
下载up.sh

You need to copy up.sh into the hexoblog file, which is your blog root directory

然后在存放up.sh脚本的目录中,右键打开git bash运行以下命令:

source up.sh

Deploy the necessary configuration for the blog

First you need to open the root configuration file _config.yml

Find deploy, which is usually in the last line, and change it to the following format

You just need to modify the information behind the repo

deploy:
  type: git
  repo: Fill in your warehouse address here, it is recommended to use SSH address, which is beginning with git
  branch: master

After version 1.3 of [heox-script] you do not need to install the upload plug-in yourself, but if an error is reported showing that the upload plug-in was not successfully installed, you need to execute the following command

cnpm install hexo-deployer-git --save
or you can run :npm install hexo-deployer-git --save

Last updated

Was this helpful?