Markup in frontmatter?

Hi all. I’m new to middleman, but enjoying things so far. I’ve got a site that is basically only templated data. The frontmatter for each page has a set of fields that are inserted into layouts. In other words, yield is almost always empty.

So, occasionally I’d like to mark up a field in frontmatter using markdown or whatever. For example, to bold some text or create a list. Is this possible?

Thanks.

Here are the syntax from two other systems (Push and Pandoc). Maybe they will give you a starting point.

http://push.cwcon.org/learn/yaml-and-markdown.html

http://johnmacfarlane.net/pandoc//demo/example19/YAML-metadata-block.html

Thanks @tommysundstrom. I tried the ‘>’ but it didn’t work. I don’t think (but haven’t verified) that frontmatter data is parsed. Either that or it is parsed after the render.

Along with help from this question I was able to write a helper:

test.html.erb:

---
layout: "testlayout"
datafield_with_markdown: |
  *blah blah*
---
this is a test.

in config.rb

helpers do
  def custom_render(source)
    Tilt['markdown'].new {source}.render
  end
end

testlayout.erb

<%= custom_render(current_page.data.datafield_with_markdown) %>
<p><%= yield %></p>

gives me:

<p><em>blah blah</em></p>
<p>this is a test.</p>