Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Support YAML front matter #36

@weierophinney

Description

@weierophinney

The github specification now allows/defines YAML front matter for mustache documents; this provides a way to create default values for the view.

In all cases, front matter begins and ends with a line containing only ---. You can have a single front matter section, or multiple front matter sections.

A single front matter section:

---
names: [ {name: chris}, {name: mark}, {name: scott} ]

---
{{#names}}
  Hi {{name}}!
{{/names}}

Multiple front matter sections:

---
name: chris

---
name: mark

---
name: scott

---
Hi {{name}}!

Technically, this is a feature of the mustache command, and not necessarily required by implementations. However, when considering things like template inheritance, it could be a useful feature.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions