Sep 11, 2018

Building Static Websites with Jekyll

Written by Avantgarde
Reading time: 1 min


Share this article:

 

The major advantages of a static website are simplicity, speed and security. Static websites, such as those built with Jekyll, are fairly low maintenance. In terms of hosting, Jekyll websites when published can be hosted on any web server that can serve static pages without a need to host databases, interpreters and scripts enabling the developer to concentrate on the presentation layer or theme for the website.

Setting up Jekyll on a Debian system is smooth and straight forward using the in-built system package manager. Jekyll is a Ruby Gem that can be installed on almost any system that supports installation of Ruby development environment.

We are reproducing the general steps below. You can also follow the official guide available at Jekyll Installation

Requirements for Jekyll:

  • Ruby version 2.2.5 or above
  • Ruby Gems
  • GCC and Make

Steps:

Step 1: Install the Ruby environment

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

Step 2: Install Jekyll

gem install jekyll bundler

Step 3: Create new site-theme development environment

mkdir -p ~/mynewwebsite

cd ~/mynewwebsite

jekyll new .

Step 4: Publish or Build your website

jekyll serve -w

Step 5: View your new website in a browser

http://localhost:4000

The new website uses the base Jekyll theme ‘Minima’. The above commands at Step 3 create a number of sub-directories and files that enable your new website to be built at Step 4.

Alternatively, you can develop your own theme from scratch using a combination of SCSS and Liquid templating syntax to separate theme or layout from content.

The content in a Jekyll build enevironment is written in ‘Markdown’ syntax that is converted to appropriate HTML at build time or when the web site is published.

We will revisit the brief introduction to Jekyll we have posted here with some detailed steps in creating new themes, layouts and handling data in the Jekyll system in due course.


Share this article: