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

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

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

image-20210603000219393

Download

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

Install

# 1. 安裝RubyGems:解壓縮RubyGems並cd至其目錄下
cd rubygems
ruby setup.rb
# 2. 替換gem源(可選)
gem sources --add //gems.ruby-china.org/ --remove //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

image-20210602220529246

# 1. 克隆Github項目,svn和git方式二選一
git clone //github.com/vectorxxxx/vectorxxxx.github.io
# 快速下載必要的文件,過濾模板中博文和圖片
# svn checkout //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

  • ❤️ ​//jekyllthemes.org/
  • ❤️ ​//github.com/jekyll/jekyll
  • ❤️ //jekyllthemes.dev/

Theme


參考手冊

參考資料