We are working very hard to bring you the best documentation possible.

HTML DOCUMENTS

Front Matter

Required: Yes
Project Location: src/templates

Front matter is integral to fusion.ssg's build process and it is required at the top of every template, even when either or both the template and the front matter are empty.

fusion.ssg relies on the library gray-matter to convert front matter to JavaScript.

A template with front matter.

---
title: Hello
slug: home
---
<h1>Hello world!</h1>

The above results in a JavaScript object like this:

{
  content: '<h1>Hello world!</h1>',
  data: {
    title: 'Hello',
    slug: 'home'
  }
}

Excerpts are also supported.

---
title: Hello
slug: home
---
This is an excerpt.
<!-- end -->
<h1>Hello world!</h1>

The above results in a JavaScript object like this:

{
  content: 'This is an excerpt. <h1>Hello world!</h1>',
  data: {
    title: 'Hello',
    slug: 'home'
  },
    excerpt: "This is an excerpt."
}