title: Is there a way to loop through the front matter of a jekyll collection?
body: <p>I have a Jekyll collection which is not being output, but elements of which are being displayed on a single page, like this:</p>
  
  <pre><code>{% for element in site.collection %}
    {{ element.content }}
  {% endfor %}
  </code></pre>
  
  <p>I would like to be able to do something like this:</p>
  
  <pre><code>{% for element in site.collection %}
    {{ element.content }}
    {% for front_matter in element %}
      &lt;!-- do stuff --&gt;
    {% endfor %}
  {% endfor %}
  </code></pre>
  
  <p>This is possible with YAML hashes in YAML _data files, but doesn't work here because, it seems <code>{{ element }}</code> on its own is identical to <code>{{ element.content }}</code>. There doesn't seem to be any variable designated for this either like, <code>{{ element.front_matter }}</code>. Is it possible to loop through the front matter of an element in a jekyll collection?</p>
  
  <p>I know that the ideal way to do this would be to include all the front_matter I want to loop through in a variable, like:</p>
  
  <pre><code>---
  front_matter:
    foo: bar
    bar: foo
  ---
  </code></pre>
  
  <p>But, as I'm trying to configure these pairings (<code>foo</code> and <code>bar</code>) to be easily updatable through prose.io, they can't be nested under other values. If there is a 
  way around this with prose though, I would accept that answer.</p>
  
  <p>Much appreciated!</p>