安装Git Bash
下载地址:https://git-scm.com/downloads
安装过程一路下一步即可
安装Node.js
下载地址:https://nodejs.org/zh-cn/download/
安装过程一路下一步即可
安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.com

用cnpm安装hexo
cnpm install -g hexo-cli

初始化博客
移动到一个空文件夹作为博客文件夹,运行 hexo init

基本使用
创建文章
hexo n "新文章标题"
生成博客
hexo clean
hexo g
启动本地博客
hexo s
访问 http://localhost:4000/ 即可看到博客效果
部署到GitHub上
创建博客仓库
仓库名必须是 用户名.github.io
安装Git部署插件
cnpm install --save hexo-deployer-git

修改配置文件_config.yml

部署博客
hexo d
想进一步了解编程开发相关知识,与我一同成长进步,请关注我的公众号“松果仓库”,共同分享宅&程序员的各类资源,谢谢!!!
网友评论