前提
- 必須有一個GitHub賬號且本機安裝有Git
一、創(chuàng)建一個新的倉庫
- 在你的 github官網(wǎng) 主頁新建一個倉庫 名字為USERNAME.github.com USERNAME為你的用戶名(下同)
二、安裝Jekyll-Bootstrap
- 在Git Bash中輸入如下命令 將代碼clone到你本地
git clone https://github.com/plusjade/jekyll-bootstrap.git USERNAME.github.com
cd USERNAME.github.com
git remote set-url origin https://github.com/itmyline/USERNAME.github.com.git
git push origin master
- PS:如果想clone到指定目錄,則使用如下格式 git clone xxx.git “指定目錄”
三、完成
- 接下來Github將創(chuàng)建你的公開博客。

如果你已經有blog在Github上?
- 假設你機器上安裝有jekyll,如果沒有請參考Windows上安裝Jekyll。 在本地運行Jekyll-Bootstrap,打開命令行工具 輸入如下命令:
$ git clone https://github.com/plusjade/jekyll-bootstrap.git
$ cd jekyll-bootstrap
$ jekyll serve
- 瀏覽器中打開localhost:4000 我們將能看到和搭建在github上一樣的效果
文章參考來源:麥田技術博客