0x00 写在前面
优缺点
优点:零成本!缺点:比较慢.
感谢:
- GitHub Pages
- GitTalk
- GitHub
0x01 工具
- Node.js一枚 (试试
node --version,没有的话去http://nodejs.cn/download/下载) - Git
scoop install git即可 - GitHub账号一枚 https://github.com
0x02 博客搭建
命令行输入:
1 | $ npm install hexo-cli -g |
选择你的主题
推荐NexT主题.
点击 https://github.com/iissnan/hexo-theme-next/releases/latest

下载.
解压为next

接下来我们要部署到GitHub上去。
确定ssh公钥配置完成 https://docs.github.com/cn/github/authenticating-to-github/connecting-to-github-with-ssh

继续。
打开./_config.yml
前面改一下
1 | language: zh-CN |
找到deploy:
改成:
1 | deploy: |
bash 输入hexo d,
打开[你的用户名].github.io,能看到了吗?
接下来,我们再写新博客
hexo new 测试文章
code ./source/_posts/测试文章.md
编辑完后,hexo d -g 生成并发布即可。
0x03 latex公式
code ./themes/next/_config.yml
搜索mathjax,更改其中内容即可。
0x04 添加 GitTalk评论
参见https://www.jianshu.com/p/02fc71f3633f