Jekyll

Category: /knowledge /front_end
Tags: front_end

Installation

New installation instruction @ github.com

Ubuntu 14.04

Ubuntu 14.04 has Ruby 1.9.x which makes gem and Jekyll installation much easier.

Install ruby, nodejs and jekyll:

  sudo apt-get install ruby ruby-dev make gcc nodejs
  sudo gem install jekyll --no-rdoc --no-ri
  sudo gem install github-pages --no-rdoc --no-ri

If you see ‘zlib missing’ error message, need to install zlib

  sudo aptitude install zlib1g-dev 

Check installed version:

$ jekyll -v
jekyll 2.5.3

Stack Overflow has instruction to install Ruby 2.0+.

Ubuntu 12.04

Ubuntu 12.04 comes with Ruby 1.8.x which is kind of old for Jekyll 2.5 on github pages. The installation requires extra workaround steps.

Basic operations

Create a new site

jekyll new your-new-site
cd your-new-site

Site generation, add this line in .bashrd

alias jk='jekyll serve --watch --port 8000'

then in the site folder, run jk, open a browser at http://localhost:8000

评论

提示

  • 如果看不到评论部分, 请暂时关掉adblock in Firefox/Chrome
  • 本网站使用Javascript实现评论功能, 此处外链对提高您的网站PR没有帮助. (潜台词: 请不要灌水, 谢谢)