环境安装
node.js
git
然后在命令行输入如下
npm install hexo-cli -g
hexo init blog
cd blog
npm install
hexo server
浏览器里打开http://localhost:4000/ 就能看见了
主题安装【可选】
https://material.viosey.com/start/
上传到github
配置github
New repository 名字为 你的github名字.github.io
ssh-keygen -t rsa -C "youremail@example.com"
生成id_rsa和id_rsa.pub两个文件
把id_rsa.pub添加到github里面
配置hexo
打开_config.yml
修改如下
deploy:
type: git
repo: git@github.com:xx/xx.github.io.git
branch: master
写作
hexo new "标题"
然后在source\_posts
目录里面找到标题.md
编辑好内容后 执行
hexo clean
hexo generate
生成静态页面
hexo server --debug
进行本地调试
上传
觉得差不多就直接上传吧
hexo deploy