Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Front Matter

Leonard Lamprecht edited this page Jan 31, 2016 · 2 revisions

All pages and posts can contain a so-called "Front Matter". That's a small block of information which can be accessed by using the {{page}} template tag. Here's an example:

The located in /pages/index.hbs contains the following lines at the top:

---
title: Home
description: Where the stories start
---

Now those variables can be accessed in the code of the page itself (or even in its layout) using the following template tags:

{{page.title}}
{{page.description}}

But wait! That's not the only thing you can do with it. It's even possible to set the layout per-page by simply using the layout property:

---
layout: home
---

Noticed something that isn't correct? Please open an issue.

Clone this wiki locally