This post documents me setting up this site using jekyll. I have not been exposed to jekyll before and will describe my experience here. You can expect the following topics to be covered:

  • Repository setup and using jekyll to generate the project
  • Specs: ruby, jekyll & minima versions
  • Theming: Jekyll’s default theme minima
    • What’s in a theme?
  • Hosting: Keep it simple
    • Webspace Hosting with FTP Upload

As I am not proficient in creating jekyll sites this will just be scratching the surface on most topics. Dont expect a deep dive here, that might maybe follow in future posts.

Getting Started

I am hosting the source of this site using github. I created a repository there, created the project directory using jekyll new codequest.de, cded into the directory and git inited it. Then I pushed my inital commit. At that point I could start the project locally using jekyll serve.

Jekyll’s Quickstart was helpful to begin. After installing ruby I just did

    gem install jekyll bundler
    jekyll new codequest.de

and had my project up and running.

Quick side note: I read about some alternatives like Hugo and 11ty but Jekyll seems to be battle tested, has a large community and, what matters the most, fits my current needs.

Specs

I am using the following versions:\

Ruby: 3.2.2
Jekyll: 4.3.3
Minima: 2.5.1

Theming

I soon realized jekyll comes with theming support and a default theme called minima. This means your site will have a default look and feel out of the box. Jekyll, when generating the site, will use the theme specified in the _config.yml file (theme: minima).

You are ready to start writing posts inside the posts directory. Just add a layout value of _post in the frontmatter of your md-file and you use the layout specified by minima.

How is minima built?

Minima is a gem that provides a default theme for jekyll. It is a collection of layouts, includes, sass and js files. It basically is a repository containing for example the following directories:

  • _layouts
  • _includes
  • _sass
  • assets

The _layouts directory contains the html files that define the structure of your site. The _includes directory contains html snippets that can be included in your layouts. The _sass directory contains the stylesheets that will be processed into the theme’s main stylesheet main.css. The assets directory contains the js and css files that are used in the theme.

Overriding theme files

To override the theme files you can just recreate the theme’s directory structure in your project and copy the files you want to override. Edit the files as you wish and jekyll will prefer the versions in your project over the ones in the theme.

Hosting

I want to get this site up and running with minimal inital effort. My hosting provider offers webspace, from which a site can be served. I just have to create a redirect from my domain to a subdirectory in the webspace and the site is live (assuming e.g. an index.html is presnt in the directory). I created an ftp user to connect and upload my generated _site to the webspaces directory.