Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support YAML front matter #36

Open
weierophinney opened this issue Aug 31, 2015 · 0 comments
Open

Support YAML front matter #36

weierophinney opened this issue Aug 31, 2015 · 0 comments
Assignees
Labels

Comments

@weierophinney
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant