Skip to main content

Jekyll for GitHub Pages

Here are useful references for using Jekyll for GitHub Pages:

Installation

sudo apt-get install ruby-full build-essential zlib1g-dev

gem install bundler
gem install jekyll -v 3.8.6

# Install jekyll using the Gemfile
# bundle init
# bundle add jekyll
# bundle exec jekyll new --force .

# Create a project from scratch
jekyll new --force .

# Install the requirements for already existing project
# bundle install

# To serve
bundle exec jekyll serve
# TO serve in a subdir
bundle exec jekyll serve --baseurl /cicd-cheatsheet

In case there is permission issues with gems:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Table of Contents using Kramdown Processor

You can just put something like this:

**Table of Contents**
- TOC
{:toc}

You can check these references for further instructions:

CICD Cheatsheet Setup

Check out the blog posts below for different topics. To serve this page do the following:

# Install everything
sudo apt-get install ruby-full build-essential zlib1g-dev
gem install bundler

# cd into this folder
cd docs
bundle

# Serve this pages
bundle exec jekyll serve --baseurl /cicd-cheatsheet

The resulting we page will appear in http://127.0.0.1:4000/cicd-cheatsheet/.

In case there is permission issues with gems:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc