在多设备上发布博客
This blog is to test how to write blogs on multi-device.
更换电脑操作
一样的,跟之前的环境搭建一样,
1
| sudo apt-get install git
|
1 2
| git config --global user.name "yourgithubname" git config --global user.email "yourgithubemail"
|
1 2 3 4 5
| ssh-keygen -t rsa -C "youremail" #生成后填到github和coding上(有coding平台的话) #验证是否成功 ssh -T git@github.com ssh -T git@git.coding.net #(有coding平台的话)
|
1 2
| sudo apt-get install nodejs sudo apt-get install npm
|
1
| sudo npm install hexo-cli -g
|
但是已经不需要初始化了,
直接在任意文件夹下,
然后进入克隆到的文件夹:
1 2 3
| cd xxx.github.io npm install npm install hexo-deployer-git --save
|
生成,部署:
Tips: 然后就可以开始写你的新博客了
1. 不要忘了,每次写完最好都把源文件上传一下
1 2 3
| git add . git commit –m "xxxx" git push
|
2. 如果是在已经编辑过的电脑上,已经有clone文件夹了,那么,每次只要和远端同步一下就行了