title: Filter posts by category in Jekyll
body: <p>I have a folder of markdown files each with a number of key/values. I need to filter all of the markdown files in the <code>_faq</code> folder by the key <code>faq_category</code>.</p>
  
  <p>I have tried:</p>
  
  <pre><code> {% assign post = site.faqs | where: "faq_category", name-of-category %}
    &lt;ul&gt;
    &lt;li&gt;{{ post.title }}&lt;/li&gt;
    &lt;/ul&gt;
  </code></pre>
  
  <p>However, this is showing nothing in the end.</p>
  
  <p>The folder structure it should be looping through is:</p>
  
  <pre><code>jekyll
  |
   --faqs
     |
     --name-of-faq
     --name-of-faq-2
  </code></pre>
  
  <p>Sample markdown file:</p>
  
  <pre><code>title: name of faq
  faq_id: 2567
  slug: title-of-faq
  created: Mar 6, 2017
  modified: Mar 6, 2017
  faq_category: how to fly
  </code></pre>