长风破浪会有时,直挂云帆济沧海。
唐.李白

【求你将我放在你心上如印记,带在你臂上如戳记。因为爱情如死之坚强,嫉恨如阴间之残忍。】 —— 圣经.雅歌 8.6
首先是要完成基本的hexo框架的搭建,可以参考这里hexo搭建,这里不再多说,主要说一下部署过程。
将自己的hexo博客部署到Github,就要用到git shell,这里提醒一下本地使用的是
Github for windows
客户端,就不能直接git到博客的根目录去提交,这样有三个坏处:
- 因为这里包含主题目录,文件相对较大,提交这些文件上去,没有太大的用处;
- 很可能造成hexo博客文件上传失败;
- 如果这样提交,也很可能造成博客运行不起来;
1、新建 hexo new “文件名”
2、编译 hexo generate(也可以简写hexo g)
3、开启本地服务 hexo server(也可以简写hexo s)
4、当修改source文件后,应清空public,重新编译 hexo clean
5、部署到GitHub或Gitcafe(访问速度快)hexo deploy(也可以简写hexo d)
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
1 | $ hexo new "My New Post" |