先从我怎么搭建这个博客开始吧

博客地址是https://jiaqiangbandongg.github.io/

环境安装

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 "[email protected]"

生成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

你可能感兴趣的:(hexo,博客,git,日常琐事)