使用Jekyll + GitHub Pages免費搭建個人部落格

My Blog無名の輩 | VectorX (vectorxxxx.github.io)

Download

因為我本地已經有Node.jsPython環境了,所以無法驗證是否確實需要。不過參考了很多教程,大多數是沒有說明需要安裝兩種環境的。如果你在安裝過程中遇到問題,可以再選擇安裝。

Install

# 1. 安裝RubyGems:解壓縮RubyGems並cd至其目錄下
cd rubygems
ruby setup.rb
# 2. 替換gem源(可選)
gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
gem sources -l
# 3. 安裝jekyll
gem install jekyll
# 4. 安裝bundler
gem install bundler

至此,我們的基本環境已經搭建完畢

Clone

GithubFork專案:wu-kan/wu-kan.github.io: my homepage & template for jekyll-theme-WuK

修改Settings設定:格式your_username.github.io

# 1. 克隆Github專案,svn和git方式二選一
git clone https://github.com/vectorxxxx/vectorxxxx.github.io
# 快速下載必要的檔案,過濾模板中博文和圖片
# svn checkout https://github.com/vectorxxxx/vectorxxxx.github.io/trunk/ --depth=files
# 2. 自動下載並部署所有依賴
cd vectorxxxx.github.io
bundle install

Run

# 執行啟動命令 s/serve/server is all right!
bundle exec jekyll serve
# 如果出現埠衝突,可以手動指定埠號
bundle exec jekyll serve --port [port]

Themes

Theme

Link


參考手冊

參考資料