Jekyll, a simple static website

22 Apr 2016 . general

What is Jekyll?

You want to generate a very simple static website? Jekyll is the right tool for it. It takes a template directory containing raw text files in various formats, runs it through a converter (like Markdown) and the Liquid renderer, and spits out a complete, ready-to-publish static website suitable for serving with your favorite web server. There are a lot of free themes to find on the internet. When you use a pre-made theme the you only need to the learn the YAML/Markdown syntax. It is not necessary to have knowledge about HTML/CSS because Jekyll will convert everything to HTML for you. You also can start from scratch and develop your own theme.

What do we need?

Jekyll can be installed on your system, you don’t need a webserver for it. First we need to install the Jekyll package that can be installed through a rubygem:

gem install jekyll

With Jekyll there is also a specific document structure. More information about the document structure you can find here. Now the development of your website can start. After that we need to build and serve the site. The following commands will build and serve your new website.

jekyll build (this is only needed when you want to push changes)

jekyll serve (this will build/serve you static website on your local webserver)

When you run jekyll build, it will parse your _config.yaml file and generate the html files into the specific _site folder. The jekyll serve command will spin up a local webserver and load the html files in the _site folder into his DocumentRoot. It is not necessary to have knowledge about a webserver because Jekyll does everything for you.

You can find a quick-start guide over here.

Where to host this website?

A Jekyll website can be hosted on many different ways. First off all you can host it on a standard hosting like we al know. Just upload the files in the _site folder and your website is ready to go live. Jekyll provide also the possibility to host your website on GitHub. Only one disadvantage for this is when you make use of different plugins for you Jekyll site. GitHub does not support al the plugins yet.

But we at Gluo go for another solution. We are hosting our website just on a Amazon S3 bucket. There are really amazing tools to find in the internet to deploy your website to this bucket. We make use of the s3_website plugin.

If you want to start with Jekyll. The first step is to visit their official website.

Share this blogpost