<table class="text">
<tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 上传到github仓库A,(也可以用一个仓库不同分支),静态文件 static 放在仓库B, 如遇新电脑先clone From A,然后在本地新电脑操作如下 新建文件夹 third git init 从A仓库拉取分支201611 git clone -b 201611 https://github.com/tuber/hexo.git 如果默认是master那就不用指定-b,这取决于push的时侯的命名规则 注意:这是A仓库hexo 的dynamic文件,如果为Pulic,后患就是别人可以直接clone,然后分分钟拿走你所有文章。 (小问题:next主题是空的,我目前只能手动复制粘贴此主题,没找到为啥) 复制主题后, tb@tb MINGW64 /c/third/hexo (201611) $ hexo new '在third文件夹下写的文章' INFO Created: C:\third\hexo\source\_posts\在third文件夹下写的文章.md 这样本地就有了,下一步就是生成文件 hexo g 这时候可以通过默认4000端口查看下,样式内容应该都没问题。 然后提交到hexo仓库,就算是关键数据备份了 git add * git commit -m'thrid' git push 远程A仓库 本地仓库(都配置好了可以省去) 最后一步就是发布到github.io了,直接hexo d即可 为啥直接hexo d就行了呢,因为你的hexo 最外层配置是 deploy: type: git repo: https://github.com/tuber/tuber.github.io.git branch: master message: static 上面的repo就是开头说的仓库B 还有个问题就是文章顺序会乱..