Github+Hexo 博客配置
Github 配置
Hexo 配置
1 2 3 4
| $ npm install hexo-cli -g $ hexo -v "检验安装是否正确" $ hexo init "初始化" $ hexo g (hexo generate) "生成静态文件,储存在public文件夹中"
|
预览
1
| $ hexo s (hexo server) "启动本地web服务,用于博客的预览"
|
预览网址:http://localhost:4000
上传github
- 需在文件 _config.yml 中设置github地址
1 2 3 4
| deploy: type: git repo: git@github.com:SandBoat/SandBoat.github.io.git branch: master
|
1
| $ hexo d (hexo deploy) "上传服务器"
|