环境准备node.js npm cnpm git(略)
注:右键,以管理员身份进入cmd
安装hexo-cli脚手架
cnpm install hexo-cli
初始化
hexo init
会自动上github上去下载项目
启动
hexo s
新建一篇文章
hexo n “xxxx”
清理下
hexo clean
生成下
hexo g
在github上面部署
创建一个新仓库
注:名字必须是 昵称+github+io
例:chr1043086360.github.io
安装部署的插件
cnpm install --save hexo-deployer-git
打开配置文件
vim _config.yml
修改部署的配置
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo: https://github.com/chr1043086360/chr1043086360.github.io.git
branch: master
部署成功
更换主题
推荐:https://github.com/litten/hexo-theme-yilia 腾讯的大佬开源的
git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
克隆到自己的 themes/yilia 文件夹下面
再次修改配置
略
清理下
hexo clean
生成下
hexo g
推到github
hexo d
Bingo 完成
来源:https://blog.csdn.net/qq_44291044/article/details/99224058