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.
环境准备
- Node.js环境
- Git
Hexo安装及升级
1 | npm install hexo -g |
更新hexo最新版本
1 | npm update hexo -g |
博客搭建
Github/Gitee上创建一个仓库my-blog(仓库名称可以根据自己需要取名),并clone到本地
初始化
1
2cd my-blog
hexo init
生成网站
1
hexo g
启动本地
1
hexo s
启动服务后,就可以访问:http://localhost:4000/(port 预设为 4000,可在 _config.yml 设定)
部署步骤
每次部署的步骤,可按以下三步来进行:
1 | hexo clean |
常用命令
1 | hexo new "postName" #新建文章 |