## Hero个人博客搭建
### **要求:**
nodejs版本不低于12.0
git
### 安装Hexo
```shell
$ npm install -g hexo-cli
```
安装 Hexo 完成后,请执行下列命令,Hexo 将会在指定文件夹中新建所需要的文件。
```shell
$ hexo init <folder>
$ cd <folder>
$ npm install
```
新建一个博客
```shell
$ hexo new <title>
```
生成静态文件
```shell
$ hexo generate
```
发表博客
```shell
$ hexo publish <title>
```
启动服务器。 默认情况下,访问网址为: `http://localhost:4000/`
```shell
$ hexo server
```
修改配置文件_config.yml
```yaml
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: git
repo: <自己新建仓库的仓库地址,仓库命名末尾必须为.io.git>
branch: master
```
将博客部署到github
```shell
$ hexo deploy
```
参考文献:
https://hexo.io/zh-cn/docs/
bilibili ->博主codesheep-->手把手教你从0开始搭建自己的个人博客