hexo build a lot, do not describe here the process online. The main talk between different computer synchronization hexo blog.
Create a remote repository
You can use github, OSC, coding, etc., the best choice for a private library, due to the github only private library is not free, want to save points can choose a free private library (such as OSC, coding).
Add the git SSH public key to the remote repository.
.gitignore operation
New or Open .gitignore in the root directory hexo
1 |
/.deploy_git |
/.deploy_git and / public file during hexo d
regenerates when
/ node_modules use npm install
or cnpm install
(Taobao mirror) regenerates
/_config.yml self-preservation, such as care can be uploaded to a remote repository
Hexo upload files to a remote repository
Open Git Bash at the root of hexo
1 |
git config --global user.name "Your Name" |
Other computer terminal operations
Hexo installation process is not described, to carry out hexo init
this step not need to take
In Git Bash interface to synchronize projects down
1 |
git clone SSH address |
Save yourself as _config.yml file copied into the project root directory
proceed as follows
1 |
npm install or cnpm install (Taobao mirror) |
Run hexo, later to simply enter the command can be run locally blog
1 |
hexo s -g |
Open your browser, enter localhost: 4000, you can see your personal blog at local
Installation hexo git plugin
1 |
npm install hexo-deployer-git --save |
Release updates blog
1 |
hexo d -g |
After successfully posted, visit the blog page addresses View the results can look!
Original: Big Box hexo synchronization blog