Skip to content

erictleung/erictleung.github.io

Repository files navigation

Herein lies the source code of my website.

Table of Contents

Prerequisites

Jekyll sites require Ruby (>= 2.2.5).

See guides on installation. Here's an example:

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

Now install software.

gem install jekyll
gem install bundler

More information on using Jekyll and GitHub Pages can be found here. GitHub Pages has a list of their dependencies that can be found here.

Installation and Starting

# Setup
git clone https://github.com/erictleung/erictleung.github.io.git
cd erictleung.github.io
bundle install # Install dependencies

# Serve live site
bundle exec jekyll serve

# Serve site with draft blog posts
# https://jekyllrb.com/docs/drafts/
bundle exec jekyll serve --drafts

You can find more information about the static site generator, Jekyll, here. Jekyll uses various syntax to help template information, so here is a Jekyll cheat sheet.

Modified Theme

The theme for the site is modified from lanyon. A short description of it is:

Lanyon is an unassuming Jekyll theme that places content first by tucking away navigation in a hidden drawer. It's based on Poole, the Jekyll butler.

Inserting Images

I've created a small shortcut to help embed images more semantically.

{% include image.html
   url="asset/image_path_here.jpg"
   alt="Put alt text here"
   caption="This is the caption for the image"
%}

Other

Jekyll uses the Liquid templating system to inject some programming logic into some of the HTML elements. See its documentation page for more on how to use it in Jekyll.

License

MIT