0%

博客使用测试

Hexo博客使用总结

常用命令

将常用配置博客命令记录如下,以便日后操作

首先需要下面准备工作

  • 创建github个人仓库
  • git本地配置
  • node.js安装
  • hexo安装

在博客根目录git bash

  1. 链接git
1
2
git config --global user.name "lauchinyuan"
git config --global user.email "*******@gmail.com"
  1. 生成并查看SSH密钥
1
2
ssh-keygen -t rsa -C "*******@gmail.com"
cat ~/.ssh/id_rsa.pub
  1. 在github中设置SSH,将上方得到的SSH key复制到框中
  2. 查看配置状态
1
ssh -T git@github.com
  1. 修改blog配置文件_config.yml,在最后配置为
1
2
3
4
deploy:
type: git
repository: https://github.com/lauchinyuan/lauchinyuan.github.io
branch: master
  1. 安装扩展
1
npm i hexo-deployer-git
  1. 创建新MarkDown文件
1
hexo new post "article title"
  1. 生成、测试、上传
1
2
3
hexo g
hexo s
hexo d