基于hexo框架-butterfly主题-安知鱼版

一、安装hexo

1
2
3
4
npm install -g hexo-cli 
hexo init <项目名>
cd <项目名>
npm install

二、将静态博客挂载到 GitHub Pages

1.安装 hexo-deployer-git

1
npm install hexo-deployer-git --save

2.配置 hexo-deployer-git

1
2
3
4
5
# 编辑 _config.yml 文件
deploy:
type: git
repo: <your-repo-url>
branch: main

3.部署博客

1
hexo deploy

4.修改好配置后,运行如下命令,将代码部署到 GitHub(Hexo三连)

1
2
3
hexo clean && hexo generate && hexo deploy
# 或者
hexo cl; hexo g; hexo d