部署Hexo
在部署Hexo的时候,需要配置hexo/_config.yml文件,这个文件中有一个deploy的配置,我看到很多文章讲到最好将repo配置成ssh访问的形式。我在配置ssh的时候报了很多错,也没有解决。最终我选择的下面这种形式,比ssh简单多了,不用生成什么key,还
要放到GitHub上。按照下面的demo进行配置就可以发布了。
deploy:
type: git
repo: https://github.com/sealwk/sealwk.github.io.git
branch: master
参考资料
常用命令
- 新建一遍文章
$ hexo new title
简写
$ hexo n title
- 预览
访问 http://localhost:4000/
进行本地预览
$ hexo s --watch
- 生成静态文件
$ hexo generate
简写
$ hexo g
- 发布到GitHub
$ hexo deploy
简写
$ hexo d
- 查看Hexo版本
$ hexo v
- 清除缓存文件(db.json)和已生成的静态文件(public)
$ hexo clean
简写
$ hexo c
网友评论