your.github.io setup
- Initial your.github.io with hexo deployment
- Create a branch named “hexo” from your.github.io master branch
- Set “hexo” as your default branch of your.github.io
your new hexo bases setup
- Git clone git@github.com:your/your.github.io.git
- Change dir to your cloned “hexo”, install packages for hexo
1
2cd your.github.io
npm install - Make sure deploy branch in _config.yml is master
Synchronize
- git clone for inintial hexo base
- Install theme if you are not using “landscape”
themes/next example
- On your up to date hexo base: Copy your “themes/next/_config.yml” to your “hexo” branch root
1
2
3
4cp themes/next/_config.yml next-config.yml
git add .
git commit -m "sync theme config"
git push - On your new hexo base: git pull to get the latest theme’s config
1
2git pull
cp next-config.yml themes/next/_config.ymlWriting
- hexo new post to start writing
- after writing commit source to your.github.io “hexo” branch
1
2
3git add .
git commit
git push - hexo g -d to deploy to your.github.io master branch
Reference from:
使用hexo,如果换了电脑怎么更新博客?