Skip to content

Instantly share code, notes, and snippets.

@brabect1
Last active November 21, 2015 17:17
Show Gist options
  • Save brabect1/f9d1f00cd7431328faef to your computer and use it in GitHub Desktop.
Save brabect1/f9d1f00cd7431328faef to your computer and use it in GitHub Desktop.
Jekyll experiments Ubuntu 14.04

Installation

This is for ruby version 1.9.3. See that we need to install 2.x version of Jekyll.

apt-get install ruby ruby-dev rubygems-integration
gem install jekyll -v '2.5.0'
apt-get install nodejs

For more recent version (3.x) of Jekyll -- not tested !!!

apt-get install ruby2.0 ruby2.0-dev rubygems-integration
gem install jekyll
apt-get install nodejs

Quick Start

see http://jekyllrb.com/docs/quickstart/

which jekyll
jekyll new myblog
cd myblog && jekyll serve

Getting Github Blog Template

see http://www.smashingmagazine.com/2014/08/build-blog-jekyll-github-pages/ and https://github.com/barryclark/jekyll-now ... also may use starting repos linked from the previous github page

# for clonning Git repos
apt-get install git
# need by dependencies of the github-pages gem
apt-get install zlibc zlib1g-dev

For ruby 1.9.3 will need some older version of the github-apges gem, e.g. 25.

git clone https://github.com/barryclark/jekyll-now.git
gem install github-pages -v '25'
cd jekyll-now
jekyll serve

Modifying for GH project page

Update the starting template, among others, to work with GH project pages (see http://jekyllrb.com/docs/github-pages/). Edit _config.yml and change baseurl to /<project name>. Check by serving with jekyll: jekyll serve --baseurl ''

Then publish the contents to your GH project (ses https://help.github.com/articles/creating-project-pages-manually/)

git clone github.com/user/repository.git
cd repository
git checkout --orphan gh-pages
git rm -rf .
cp -rf <path/to/starting/template>/* ./
git add *git commit -a -m "First pages commit"
git push origin gh-pages

Visit your project GH page at http(s)://<username>.github.io/<projectname>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment