Skip to content

Frontmatter

Devin edited this page Jun 29, 2020 · 5 revisions

You can use YAML front matter in your files to set page-specific variables, such as a title or a description. You must place your YAML front matter at the top of your page, with the following format:

---
title: "Hello, world!"
languages:
  - English
  - French
---

Frontman exposes the front matter data on current_page.data.

I speak the following languages:

<ul>
  <% current_page.data.languages.each do |lang| %>
  <li><%= lang %></li>
  <% end %>
<ul>