Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.

Jekyll Collections

justusadam edited this page Jul 14, 2015 · 2 revisions

Jekyll collections are a way of managing large amounts of structured content.

Collections are stored in a folder named like the collection, with an underscore prepended.

Aka collection "news" is stored in "_news".

Element structure

Collection elements can be either Markdown or HTML. Jekyll will convert it automatically, based on the file extension (.html, .md, .markdown).

A collection element must starts with what is called YAML Fron Matter, which is a block of YAML formatted metadata.

The YAML Front Matter is separated by three dashes at the beginning and at the end and occurs at the very top of the document:

---
name: My name
author: Herbert
---

# The implications of too much Java

Coffee is bad for you kids

If the front matter is missing the document will not be added to the collection. It can however be empty, as long as the dashes exist:

---
---

# Title

my cool content
Clone this wiki locally