By clicking or navigating this website site, you agree to allow our collection of information on Scaleway to offer you an optimal user experience and to keep track of statistics through cookies. Learn more about our Cookie Policy.

Creating a Jekyll powered Website

Jekyll Overview

Jekyll is a Ruby based tool to generate static websites from MarkDown files.

This means it generates static HTML files from templates that are served to your visitors like standard HTML files that you have written by yourself.

This makes Jekyll a very lightweight solution in terms of RAM and CPU power as the files have only to be generated once, in difference to a page generated by a server-side language, for example in PHP, that has to be generated for each visitor.

To customize the layout of the pages, it is possible to build a template by creating the following directories and files:

Front Matters: Jeykill will interpret all files starting with a YAML Front Matter as a special file. The front matter must be the first thing in a file and must take the form of valid YAML set between triple-dashed lines. Here is a very basic example:

---
layout: post
title: Managing site content with Jekyll
---

A directory _includes, that contains all elements of the site that are being used on each page:

3 . A _sass folder, which is also empty and will contain your style elements:

_base.scss - which contains all variables, mixins, and resets

_syntax-highlighting.scss - Which can contain the information about the syntax highlighting for different languages

_layout.scss - The layout information for your site

The assets folder contains all statical assets that you want to use on your site, for example, images.

All content of the site is located in the directory _posts. To create a new blog post, create a new file in the format YYYY-MM-DD-name-of-post.markdown.

Jekyll uses the Liquid templating language to process templates. So you can place different variables in your files that will be replaced automatically with different contents.

More information on the directory structure of Jeykill is available directly in their documentation.

In this tutorial you have installed a Jekyll development instance to deploy our site and to run it locally on this machine for testing purposes. We have also setup Git to push the site to a production server and to generate it automatically by Jekyll, before it is finally served to our users by Nginx. If you want to learn more about Jekyll, you may read the official documentation.