windows下使用hexo搭建博客

先安装git、nodejs,git和nodejs的配置环境

然后:

1
2
git config --global user.email "claymantwinkle@gmail.com"
git config --global user.name "kesar"

shell下:

1
2
3
ssh-keygen -t rsa -C "claymantwinkle@gmail.com"
//测试是否ssh key有效
ssh -T git@github.com

安装hexo

1
2
npm install -g hexo
npm install hexo-deployer-git --save

hexo的使用

1
2
3
4
5
6
7
8
9
10
//初始化hexo的博客文件夹
hexo init <folder>
//hexo生成静态页面
hexo generate
//hexo发布
hexo delpoy
//hexo新建文章
hexo new post "文章名"
//hexo 本地服务启动预览(http://localhost:4000)
hexo server