1.先进入一个安全的目录,cd ~/Desktop
2.在Github上新建一个repo,repo名称是xiaoxinwan.github.io
3.到git bash下
npm install -g hexo -cli //安装Hexo
4.hexo init myblog //初始化myblog
5.cd myblog
6.npm i
7.hexo new 博客名称 //将看到一个“博客名称.md”文件的路径
8.start xxxxxxxxxxxxxxxxxxx.md //xxxx代表的是.md文件的路径,然后编辑这个文件
9.start _config.yml //编辑网站配置,第6行title改成文章名字,第9行author改了,最后一行type改成type: git(记得git前有空格),继续加一行(和type左对齐)repo: 仓库地址(git@github.com:开头的)
10.npm install hexo-deployer //安装git部署插件
11.hexo deploy
12.进入 你的用户名.github.io/index.html (记得打开GitHub page功能) 就会看到你的博客