Ruby collection

The Ruby collection is both an example of a Jekyll collection and an instruction for how to setup Ruby - the programming language in which Jekyll is written.

Collections - a quick tutorial

  1. Create a folder named “underscore”+”collection name” (_<collection-name>),
  2. Edit _config.yml to include this collection and its permalink,
  3. Create a pages scope for linking to the collection items, set the layout to collection, and collection to _<collection-name>
  4. add other options in the front matter of the pages scope, including overriding the _config.yml defaults.
  5. create the collection documents in the collection folder _<collection-name>, the front matter can be cut down to title only.

For more details read on or visit the Jekyll document on Collections.

Karttur’s collections

This document is itself of the scope pages type. It is the front page (or root) of the collection called ruby. To end up in the root directory of the ruby collection, the front matter key permalink is set to /ruby/. The complete front matter of this page thus looks like this (for details on how this defines the layout see the pages document in this site):

layout: collection
title: "Ruby collection"
excerpt: Setting up Ruby, creating and customising jekyll collections
author_profile: true
permalink: /websetup/ruby/
collection: ruby
entries_layout: grid
classes: wide
toc: false
sidebar:
  nav: "jekylldocs"
toc: false

The setting above generates a grid layout (entries_layout: grid) from the markdown documents in the collection folder (collection: ruby). You do not need to add any other code.

Resources

Jekyll collection

Ruby programming language

Collection content

Ruby collection

This introduction on how to install and setup Ruby for Jekyll is written as a Jekyll Collection. In reality that only means that each document is saved insid...

Ruby versions

As Jekyll is written in Ruby, a Ruby environment is required for setting up Jekyll. Setting up Ruby is not difficult at first, but becomes cumbersome when yo...

Ruby installation

To install and maintain a separate version of Ruby on your MacOS, you can choose from a range of approaches. I use the package manager Howebrew. Installing H...

Gem updates

Regardless if you used a Ruby version manager or a bare-bone installation (see previous post), you should check keep your Ruby environment and its gems updat...