Hexo——我的博客之路

首先,我需要一个GitHub的空repo,名为Cissy.github.io。

然后,在git bash中依次操作以下步骤:

1 进入一个安全的目录 cd ~/Desktop

2 npm install -g hexo-cli,安装 Hexo

3 hexo init myBlog

4 cd myBlog

5 npm i

6 hexo new 博客名字

7 start xxxxxxxxxxxxxxxxxxx.md(Windows 的路径中的 \ 需要变成 / ),编辑这个 md 文件

8 start _config.yml,编辑网站配置

  a 把第 6 行的 title 改成想要的标题

  b 把第 9 行的 author 改成自己的名字(Cissy)

  c 把最后一行的 type 改成 type: git

  d 在最后一行后面新增一行,左边与 type 平齐,加上一行 repo: 仓库地址 (请将仓库地址改为        「你的用户名.github.io」对应的仓库地址,仓库地址以 [email protected]: 开头

9 npm install hexo-deployer-git --save,安装 git 部署插件

10 hexo deploy

11 进入「你的用户名.github.io」对应的 repo,打开 GitHub Pages 功能,如果已经打开了,就直       接点击预览链接

第二篇博客

1 hexo new 第二篇博客的名字

2 复制显示的路径,使用 start 路径 来编辑它

3 hexo generate

4 hexo deploy

你可能感兴趣的:(Hexo——我的博客之路)