Open navClose nav

Front Matter

Front matter is structured metadata that is stored at the top of a content file, and is identified by delimiters before and after the metadata.

This metadata is available to your templates when generating your site, and allows you to build robust, dynamic features into your static site.

Depending your static site generator, Front Matter can be formatted as YAML, TOML, or JSON.

Examples

YAML

---
title: My New Post
date: 2018-07-01 04:00:00 +0000
images:
- /uploads/2018/07/01/twitter_card.png
- /uploads/2018/07/01/banner.png
layout: default
---

TOML

+++
title = "My New Post"
date = "2018-07-01 04:00:00 +0000"
images = ["/uploads/2018/07/01/twitter_card.png", "/uploads/2018/07/01/banner.png"]
layout = "default"
+++

JSON

{
    "title": "My New Post",
    "date": "2018-07-01 04:00:00 +0000",
    "images" [
        "/uploads/2018/07/01/twitter_card.png",
        "/uploads/2018/07/01/banner.png"
    ],
    "layout": "default"
}

Last updated on December 31, 2017