搭建我的博客通常须要购买域名和空间,github pages为咱们提供了这两样东西,并且是免费的,相关介绍和使用方法参考这里 github pages。 node
一个静态博客生成框架工具,基于node.js开发。git
$ npm install -g hexo-cli
$ hexo init <folder> $ cd <folder> $ npm install
$ hexo server
查看效果http://localhost:4000/github
一款简洁易用的hexo主题。npm
$ cd <folder> $ git clone https://github.com/iissnan/hexo-theme-next themes/next
$ ssh-keygen -t rsa –C "youremail@example.com"
以rsa方式加密生成公钥id_rsa.pub私钥id_rsabash
$ ssh -T git@github.com
Host github.com HostName github.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa Host githubpages.com HostName github.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa2
$ npm install hexo-deployer-git --save
deploy: type: git repo: git@githubpages.com:shyboy1239/shyboy1239.github.io.git branch: master
备注:由于本地存在多个ssh key,githubpages.com是以前为了进行区分而配置的别名hexo
$ hexo generate
$ hexo deploy
最后,一个基本的我的博客就搭建好了!~戳这里框架